I need a complete tutorial on using the Microsoft Access Database within a Visual basic 6 application. Or posting the main commands would be helpfull as well.
Printable View
I need a complete tutorial on using the Microsoft Access Database within a Visual basic 6 application. Or posting the main commands would be helpfull as well.
Common people. Help out someone who's too tired to look for answers!
Anyone??
There are a number of ways of working with mdb's with vb6. My favorite is through ADO.
1. You set a reference to Microsoft ActiveX Data Objects.
2. Create AS NEW ADODB.Connection
For the data provider I use 'Microsoft Jet 4.0 OLE DB". By setting the ConnectionString and any necessary password properties, etc, you can then call the Open method to establish a data connection.
You can then use your choice of ado command objects or recordsets to read, write and manipulate your mdb. By set the various properties and calling the various methods, you have pretty complete control over your data. I generally use standard SQL statements to establish ADODB.Recordset objects, although there are other methods.
Look for "ADO210.chm" which is probably in your "C:\Program Files\Common Files\SYSTEM\ADO" directory for more info.