Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Still getting Error with Ado Connection

Status
Not open for further replies.

Matrix03

Programmer
Apr 9, 2001
14
CH
I am still getting one more error. At the (adoRecordset.OpenRecordset) vb is telling me that method or data member not found. How can I fix this.

Private Sub Form_Load()

Dim Treespraying As ADODB.Connection
Dim adoRecordset As ADODB.Recordset
Set Treespraying = New ADODB.Connection

Treespraying.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\My Documents\TreeSpraying.mdb"

Set adoRecordset = New ADODB.Recordset
adoRecordset.OpenRecordset "Select CustomerLastName,

CustomerFirstName", Treespraying, adOpenStatic, adLockOptimistic

End Sub
 

it should be:

adoRecordset.Open &quot;Select CustomerLastName, CustomerFirstName from <insert table name here>&quot;, Treespraying, adOpenStatic, adLockOptimistic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top