ADODB connection cannot create. Please help me with something.

Asked By 7060 points N/A Posted on -
qa-featured

My ADODB connection keywords are no appearing automatically please help me with the problem. When I press, the list of possibilities are not coming.

SHARE
Answered By 0 points N/A #83156

ADODB connection cannot create. Please help me with something.

qa-featured

 

I assume you are using VB 6.0. Then you have a solution to this. The ADODB connections work only on adding a references. You need to add the references by clicking Project-> references. Check the Microsoft active X 2.1 library and click OK.
A sample code for the ADODB connection is given below.
I shall narrate the use with ADODB connections.
Private Sub cmdXXX_click()
dim con as new ADODB.connection
dim rs as new ADODB.recordset
con.connectionstring = (“ <specify connection string>”)
con.open
con.begintrans
set rs = con.execute(“<SQL Query>”)
con.committrans
End Sub
Specify the connection string and the Sql Query you like to perform on the database.
rs is the record set that contains the returned records  by the query.
Thanks.
 

Related Questions