September 20th, 2002, 06:20 AM
ADO stands for activex database objects....it's a really simple object framework exposed through the ado com libraries.
It consists of 3 main objects that you can create....
Connection object > creates the actual connection to the database and can use the <objectname>.execute method to run a forward only recordset returning query or action statement. It also holds the errors collection to see what errors have been returned by the data provider (the oledb provider that is actually talking to the database for you...usually another dll provided by the database vendor).
Command object > this takes a connection object or it can create it's own if you pass it a connection string. This can be used to run parameterized queries (so if you have a stored procedure that takes parameters this is the way to go really). You can run the <objectname>.execute method from here and it will give you your recordset.
recordset object > again, can take a connection object or a query string. You can use this to create updatable recordsets, forward only ones, etc. If you want to create a disconnected recordset (can be handy if you are using the recordset in read only mode or for doing batch updating). Simply set the activeconnection property to nothing....and then if you need to reconnect it to the database for a batch update or something simply re-assign it a connection object.
Ado is pretty simple to use and you can use it to deal with xml, text files, access, sql server, oracle, etc (even exchange and active directory). Pretty much any data service that offers a oledb provider.
One of the best places to look for examples is probably just http://msdn.microsoft.com
Again, if you need anything just gimme a shout...I have a ton o stuff on ado and so on.
"When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
"There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
"Mischief my ass, you are an unethical moron." - chsh
Blog of X