T
TC
Few of the "basics" for new Access programmers here (aka ME! ).
Can someone tell me what the difference between ADO, DAO and OLE ODBC ? I
understand that ADO or DAO is now considered "obsolete" ?
ADO and DAO are each a set of "objects, methods and properties" for
accessing a database. ADO is the later one, DAO the earlier one. DAO was
commonly used for Access 97 & below. Microsoft took steps to enciourage
people to use ADO for Access 2000 & later, but you can still use DAO
instead, or as well. Certain features of DAO were unaccountably omitted from
ADO. It is not really true to say that either of them is "obsolete".
What does the typical command to access a recordset look like?
If you really do mean a "recordset", in the true technical sense of that
term, there is no "command" to access one. You use appropriate objects,
methods & properties to create and access a recordset. In DAO:
dim db as database, rs as recordset ' <- objects
set db = currentdb()
set rs = db.openrecordset ("SELECT * FROM MyTable")
with rs
while not .eof ' <- property
debug.print .fields(0).name; "="; .fields(0).value
.movenext ' <- method
wend
end with
set rs=nothing ' <- statement
set db=nothing
Why would I choose to use these command within an Access database?
How long is a piece of string? There are thousands of different reasons why
you might want to access a recordset. That's like asking, "Why would I want
to drive somewhere in my car?"
HTH,
TC