现在大家流行什么样的方法连access数据库啊

解决方案 »

  1.   

    ado 或者 dao
    ado 高效
    dao 灵活
      

  2.   

    给几个例子你:
     Sub Main()
        Set conn = New ADODB.Connection
        GlobalConnString = "driver={Microsoft access driver (*.mdb)};Dbq=tianyin.mdb;uid=;pwd=;defaultdir=" & App.Path & "\data"
        conn.Open GlobalConnString
    End SubDim adoCnn As New adodb.Connection
     Dim adoCmm As New adodb.Command
     Dim adoRec As New adodb.Recordset
     
     adoCnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=App.Path &  "*.MDB";Persist Security Info=False"
     
     adoCmm.ActiveConnection = adoCnn
     adoCmm.CommandType = adCmdText
     adoCmm.CommandText = "select * from Customers"
     Set adoRec = adoCmm.Execute
     Set MSHFlexGrid1.DataSource = adoRec
      

  3.   

    现在有三种连接数据库方法
    DAO,ODBC,ADO
    最好的方法就是ADO了
      

  4.   

    Dim adoCnn As New adodb.Connection
     Dim adoCmm As New adodb.Command
     Dim adoRec As New adodb.Recordset
     ADO
    Dim adoCnn As New adodb.Connection
     Dim adoCmm As New adodb.Command
     Dim adoRec As New adodb.Recordset
      adoCnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=f:\dvbbs6.MDB;Persist Security Info=False" adoCmm.ActiveConnection = adoCnn
     adoCmm.CommandType = adCmdText
     adoCmm.CommandText = "select * from [user]"
     Set adoRec = adoCmm.Execute
     Set MSHFlexGrid1.DataSource = adoRec
      

  5.   

    那一般是用ADO控件还是用ADO对象呢 两者的效率怎么样???????
      

  6.   

    我也是 好象在打包的时候要比控件多一个DLL吧 我想知道效率
      

  7.   

    其实用DATA控件也可以的,麻烦点
      

  8.   

    ADO 简单,使用方便,但效率高我不觉得。访问本地库(ACCESS)DAO 好象比 ADO 高效的多。