1 引用dao3.6
2 DAO使用database对象和recordset对象:
dim db as database, rs as recordset
set db = dbengine.opendatabase("数据库文件路径名称")
set rs = db.openrecordset("表名或SQL语句")

解决方案 »

  1.   

    引用了dao3.6,可是还是提示找不到可插入的ISAM
      

  2.   

    access数据库用不着ISAM。
    一定是你的打开语句有问题。
    把你的代码贴上来。不要让我们猜。
      

  3.   

    我原来的代码(access97可以打开):
    Private Sub Form_Load()
    DiskPathName = App.Path
           If Right(DiskPathName, 1) = "\" Then
           DiskPathName = Left(DiskPathName, Len(DiskPathName) - 1)
    End If
    With Data1
      .Connect = "access2000;uid=;pwd=123"
      .DatabaseName = DiskPathName + "\sbjl.mdb"
      .RecordSource = "bf"
      .Refresh
      .Recordset.MoveLast
    End With
    我知道用ADO可以打开:
    cnTest.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=123;" + " Data Source =" + DiskPathName + "\sbjl.mdb"
    cnTest.Open ConnectionString
    可是我用ADO以后所有原来的程序都要改,我闲麻烦!请高手们指点为什么用DAO打不开!还是提示找不到可插入的ISAM
      

  4.   

    Access2000中含有不是表格形式的东西.
      

  5.   

    Access2000中含有不是表格形式的东西?是甚么意思?
    我的库中只有表格和查询(有图片字段)
      

  6.   

    我用ODBC可以打开
    先定义ODBC
    再:dim cn as new adodb.connection
    dim rs as adodb.recordset
    dim constring as stringconstring="provider=msdasql;dsn=dsn;uid=uid;pwd=pwd"
    cn.CursorLocation = adUseClientset rs=new adodb.recordsetcn.open constring
    rs.open "select * from table where ***"
      

  7.   

    access是Microsoft Jet数据库, 在Connect中不要包含数据库类型参数:
    .Connect = ";uid=;pwd=123"
      

  8.   

    安装 VB6 补丁 5 
    使用JET4.0以上
      

  9.   

    Dim MyDB As Database
    Dim DR As RecordsetSet MyDB = DBEngine.OpenDatabase("c:\test.mdb", False, False, ";Pwd=1234")
    Set DR = MyDB.OpenRecordset("Select * From Table")
      

  10.   

    Data控件是无法直接连接到Access2000数据库的,下面的东西是从MSDN中拷贝过来的,再加上Arcan(Arcan)写的代码,应该就能解决问题了:
    Intrinsic Data Control Is Usable with Access 2000 DatabasesAt design time, trying to bind the Data control to a Microsoft Access 2000 database will result in an error: "Unrecognized database format." The Data control can still be used, however, by following the example below: 1、On the Project menu, click References. Clear the Microsoft DAO 3.51 Object Library check box.
    2、Set a reference to the Microsoft DAO 3.6 Object Library. 
    3、Draw a Data control and a TextBox control on a form.
    4、On the Properties window, set the TextBox control's DataSource property to the Data control. 
    5、Type the name of the field CompanyName into the DataField property box.
    6、Insert code similar to the following into the code window: Option Explicit
    Private daoDB36 As Database
    Private rs As Recordset
    Dim sPath As StringPrivate Sub Form_Load()
        sPath = _
        "C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb"
        Set daoDB36 = DBEngine.OpenDatabase(sPath)
        Set rs = daoDB36.OpenRecordset("Customers")
        Set Data1.Recordset = rs
    End Sub7、Run the project.
      

  11.   

    现在的VB6.0 都有jet 4.0可以