本文介绍了DAO vs ADO的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ADO Code 66 Seconds


设置dcndb =新ADODB.Connection

dcndb.Provider =" Microsoft.Jet.OLEDB.4.0"

dcndb.ConnectionString =" Data Source =" + dtbs $

dcndb.Open

设置rsUsers =新ADODB.Recordset

rsUsers.Open Sql $,dcndb,adOpenForwardOnly,adLockReadOnly


DAO代码20秒


设置rDb = DBEngine.Workspaces(0).OpenDatabase(dtbs $)

Set rsUsers = rDb.OpenRecordset(Sql $)


***通过Developersdex发送 ***

ADO Code 66 Seconds

Set dcndb = New ADODB.Connection
dcndb.Provider = "Microsoft.Jet.OLEDB.4.0"
dcndb.ConnectionString = "Data Source=" + dtbs$
dcndb.Open
Set rsUsers = New ADODB.Recordset
rsUsers.Open Sql$, dcndb, adOpenForwardOnly, adLockReadOnly

DAO Code 20 Seconds

Set rDb = DBEngine.Workspaces(0).OpenDatabase(dtbs$)
Set rsUsers = rDb.OpenRecordset(Sql$)

*** Sent via Developersdex http://www.developersdex.com ***

推荐答案




这篇关于DAO vs ADO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 09:07