GeoffS Level: VB Lord

 Registered: 29-09-2004 Posts: 536
|
Re: Transistion from DAO to ADO
Hi,
You don't say which version of VB.NET you are using, so I am assuming that it is the latest - 2005.
Connecting to, and manipulating data in, database objects is handled very differently in ADO.NET. Using DAO you would open a connection to a database, probably when your App. first starts, and would keep that connection open, doing whatever you wanted with the tables and data in that database, until your App. closed. With ADO.NET the data access model is different, it only keeps a connection open for as long as you need it to complete your actions. So, for example, to display data from a table in the database for your users to edit, you would connect, get the data, then close the connection; then when your users have made a change, you would connect again, update the data, then close the connection. To achieve this you work with Datasets and TableAdapters.
This is a big subject, more than can be answered in a post on a Forum, I would suggest that you start by looking at
http://msdn2.microsoft.com/en-us/library/8fxztkff.aspx
and http://msdn2.microsoft.com/en-us/library/cf131f6b.aspx
If you have any problems of a specific nature then post them here and someone will help.
____________________________
multi-tasking - the ability to hang more than one app. at the same time.
|