[QODBC-Desktop] Using ADODC and ADODB with QODBC
Posted by Jack - QODBC Support on 06 July 2016 02:13 PM
|
|
Using ADODC and ADODB with QODBCADODB with QODBCOpen VB6, you can find it via Windows Start->All Programs->Microsoft Visual Studio 6.0 : Create a New Standard EXE project.
Then Add "Command Button" by double clicking on the command button Icon. A command button will be added. Rename it to Get Customer via ADODB:
Double click on Command Button & add the below code in the command button click event:
Private Sub Command1_Click() Now execute the code from Run >> Start With Full Compile
Double click on Get Customer via ADODB which will get the top 10 customer's name & display it in msg box:
ADODC with QODBCNow we will add ADODC control in the same project we created in the above ADODB example.
Now we will configure ADODC control by right click on ADODC control & click on ADODC Properties:
From the General tab, Select ODBC Data Source QuickBooks Data.
Navigate to the RecordSource tab, Select Command type to 2 - adCmdTable & table name Customer, and click OK.
Now we will add three text boxes showing Customer table data through ADODC control.
Now we will configure text boxes to display data from ADODC control. Choose DataSource Adodc1 (i.e., ADODC Control name) & DataField FullName (i.e., Field name which you want to show):
Similarly, we will configure the other two textboxes with the Phone & Email fields. Now execute the code from Run >> Start With Full Compile
The following customer data will be displayed by clicking on the "Next" button.
| |
|