There are several very good sections about it in the Help file. If you just want to use an ActiveX control, go to the Project/Components menu item, and select "Microsoft ADO Data Control 6.0 (OLEDB)". Plop one onto your form and set the properties.
If you want more control over your data (for instance, to use the same recordset on multiple forms or in some other background process), use the ADODB library. Open the VB6 help, go to the Search tab and enter "ADODB". Down about 15 lines, there's a section entitled "Establishing a Connection to a Database". Go to that help topic and scroll down until you find the section entitled "ADO". It has all the basics.
For this method, you will have to set the appropriate references using the Project/References menu item. Look for "Microsoft ActiveX Data Objects 2.8 Library" and "Microsoft ActiveX Data Objects Recordset 2.8 Library". Advantages to this method are that it takes less memory than the ActiveX Data Object control, and you have more options as to when to open/close, update, etc.
The only other thing you'll need to use the ADODB objects is the value for a Connection String. Use this (with suitable changes to fit your situation, of course):
' mostly copied from the Help File ' Const ConnectionString = "provider = microsoft.jet.oledb.4.0;data source = c:\working\db1.mdb"
That will give you a good start, and probably help a bunch and give you some ideas about how to refine your Google searches if you need more details.
Hope this helps. Good luck!
Edited 4 Years Ago by BitBlt
You can also use ADODB connectors. What kind of database will you use? MySQL, Oracle, PostgreSQL, MSAccess, SQLLite, etc...
A data source relationship is a service in information technology that allows customer application to connect with data source hosting server application, whether on the same machine or not. A relationship is required to send orders and get solutions.
Hi. so this is actually a continuation from another question of mineHere but i was advised to start a new thread as the original question was already answered.
This is the result of previous question answered :
code for the listbox - datagridview interaction
At the top of the code ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
Private Sub btn_addline_Click(ByVal ...