标题:找错
只看楼主
ccc111
Rank: 1
等 级:新手上路
帖 子:105
专家分:0
注 册:2007-1-11
 问题点数:0 回复次数:1 
找错
找错
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

请问这一段有什么错误,谢谢
2008-01-11 14:38
qlong0728
Rank: 3Rank: 3
等 级:新手上路
威 望:8
帖 子:272
专家分:0
注 册:2007-6-15
得分:0 
在NET链接MDB数据库用OleDb,链接SQL数据库用SqlClient

程序人员写程序,又拿程序换酒钱。 奔驰宝马贵者趣,公交自行程序员。 不见满街漂亮妹,哪个归得程序员。
2008-01-12 09:36



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-197031-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.372007 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved