为什么VB中的MODULE模块????????
Imports System.Data.OleDbModule Commonmodule
Public mydap As OleDbDataAdapter
Public mydataset As DataSet = New DataSet
Public mytable As DataTable
Public myrow As DataRow
Public mycmdbuilder As OleDbCommandBuilder
Public Function SQLOpera(ByVal str As String, ByVal table As String)
Try
Dim row As Integer = 0
Dim selectstring As String
selectstring = "provider=Microsoft.Jet.OLEDB.4.0;Data Source="
selectstring = selectstring & Application.StartupPath() & "\Data\student.mdb"
mydap = New OleDbDataAdapter(str, selectstring)
mydataset.Clear()
mydataset.Tables.Clear()
mydap.Fill(mydataset, table)
mytable = mydataset.Tables.Item(0)
myrow = mytable.Rows.Item(row)
Catch ex As Exception
End Try
Return Nothing
End Function
End Module
各位我在模块中编了这样的代码,为什么我在其它窗口中用它会出现数据没有加载这样的窗口。难道还需要其它的设置吗?
这是什么原因,谁能帮帮忙