I note CAREFULLY in your question, you are not actually asking about ADO vs
DAO...but ADO vs ODBC direct.
It likely needs pointing out to many readers here that JET/DAO support ODBC
direct.
This means that JET DOES NOT get loaded, nor does jet even touch your sql
that you pass to the server!!!
Here is a code example for ODBC direct: (this is DAO!!)
Dim strCon As String
Dim rstRecords As DAO.Recordset
Dim wrk1 As DAO.Workspace
Dim MyCon As DAO.Connection
Set wrk1 = DBEngine.CreateWorkspace("TestWorkSpace", "", "", dbUseODBC)
strCon = "ODBC;driver={SQL Server};DSN=;" _
& "SERVER=192.168.1.101;" _
& "DATABASE=RidesSql;" _
& "UID=SA;PWD=;OPTION=3;"
Set MyCon = wrk1.OpenConnection("mycon", dbDriverNoPrompt, False, strCon)
' now, you have a regular connection, and can build a recordset as
' normal...
Set rstRecords = MyCon.OpenRecordset("select * from tblJunk")
Note I used "dbUseODBC", and thus we are by passing JET directly. Use of
this keyword means that JET is not to be used, nor even loaded!
It would also mean that recordsets that are JOINS are NOT updateable like
they would be in JET (or with ADO.......golly..does ADO support updateable
joins? (or do you have
to used shaped recordsets (another feature of ado!!)??? (anyone??)...
Hum, so, why use ADO in place of ODBC direct? Well, my only arguments is
that ADO was more designed with type of use in mind, and not very many
people use ODBC direct anymore....
ADO has better support for stored procedures etc, but, when you are using a
pass-through query...it really is not much of an advantage anyway (just sent
the raw text to the server as a query....it don't actually have to be sql
anyway).
I can only say that ADO was designed from the ground up as a database
neutral object. DAO, and the ODBC direct were the "result" of this needed.
So, ADO tends to be a bit cleaner, and likely what most of your developers
would have used....
To be honest...my arguments are not that strong in favor of ADO here, but I
think by the time the industry started using server based database systems,
then ADO was in full swing. So, likely ADO is better to due to wide spread
use.
On the other hand...if you struck with ODBC direct...you can still using
it...and skipped ADO completely!!
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(E-Mail Removed)
http://www.members.shaw.ca/AlbertKallal