注册 登录
编程论坛 VB.NET论坛

Microsoft Visual Studio .NET 2003

ccc111 发布于 2008-01-11 13:28, 1239 次点击
Microsoft Visual Studio .NET 2003中有没有dbgrid控件
3 回复
#2
ccc1112008-01-11 14:38
找错
Dim mydb As DAO.Database
    Dim myws As DAO.Workspace
    Dim mysql As String
    Dim myrec As DAO.RecordsetTypeEnum
    Friend WithEvents btsearchbooks As System.Windows.Forms.Button
    Friend WithEvents TxtsearchNumbers As System.windows.forms.TextBox

    Dim de As DAO.DBEngine = New DAO.DBEngine
    Public Function openDb() As Short
        Dim dbstr As String
        dbstr = "c:\lib.mdb"
        myws = de.Workspaces(0)
        mydb = myws.OpenDatabase(dbstr, False, False)
        dbstr = "select * from tblstudents"
        myrec = mydb.OpenRecordset(dbstr, DAO.RecordsetTypeEnum.dbOpenDynaset)
    End Function

请问这一段有什么错误,谢谢
#3
qlong07282008-01-12 09:37
NET没有dbgrid控件,不过你可以加载进去
#4
b6292008-01-14 10:56
是哦!為什麼一定要用dbgrid呢?
1