实在要用data控件的话,引用Dao3.6!Intrinsic Data Control Is Usable with Access 2000 Databases At 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: On the Project menu, click References. Clear the Microsoft DAO 3.51 Object Library check box. Set a reference to the Microsoft DAO 3.6 Object Library. Draw a Data control and a TextBox control on a form. On the Properties window, set the TextBox control's DataSource property to the Data control. Type the name of the field CompanyName into the DataField property box. 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 SubRun the project.
例子:Access2000数据库db1.mdb 密码:1234我无论怎么选择Access 还是Access2000,无论在connect 里设置Access;pw="1234"
还是设置Access2000;pw="1234"还是没有引号,当选择RecordSource都出现“找不到可安装的ISAM”的问题。~~请帮帮我~~我另开贴求助~~谢谢!!
At 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: On the Project menu, click References. Clear the Microsoft DAO 3.51 Object Library check box.
Set a reference to the Microsoft DAO 3.6 Object Library.
Draw a Data control and a TextBox control on a form.
On the Properties window, set the TextBox control's DataSource property to the Data control.
Type the name of the field CompanyName into the DataField property box.
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 SubRun the project.
在程序里Access2000;pw="1234"可以的啊!我用过的。
http://expert.csdn.net/Expert/topic/1958/1958522.xml?temp=4.378909E-02
谢谢各位!!结贴~放分~~