来自:微软 翻译:周芳
【译文】把DAO代码转化为ADO
注意:Microsoft Access 2010不支持 DAO3.6之前的版本
DAO到ADO对象示意图:
任务:
打开一个记录集:
DAO:
Dim db as Database
Dim rs as DAO.Recordset
Set db = CurrentDB()
Set rs = db.OpenRecordset("Employees")
ADO:
Dim rs as New ADODB.Recordset
rs.Open "Employees", CurrentProject.Connection, _
adOpenKeySet, adLockOptimistic
编辑一个记录集:
DAO:
rs.Edit
rs("TextFieldName") = "NewValue"
rs.Update
ADO:
rs("TextFieldName") = "NewValue"
rs.Update
原文:Converting DAO Code to ADO
Note:Versions of the DAO library prior to 3.6 are not provided or supported in Microsoft Access 2010.
DAO to ADO object Map