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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Errors

Status
Not open for further replies.

TRYP

Programmer
Jun 20, 2000
136
US
i am in a world of confusion.

i have 3 files
1.) accessFrontEnd.mdb
2.) accessBackEnd.mdb
3.) accessWorkgroup.mdw

i need to get at tables in file #2.
i have used ADO many time to date but i am getting error after error. i think im dumb now.

i cant even seem to open the darn DataBase

CODE:

Private Sub Command1_Click()
On Error GoTo errorhandler

Dim conn As ADODB.Connection
Set conn = New ADODB.Connection

Dim recs As ADODB.Recordset
Set recs = New ADODB.Recordset

conn.ConnectionString = "persist security info=false;" & "provider=microsoft.jet.oledb.3.51;" & _
"data source=d:\pensacola\PENSACOLA00d.mdb;" & _
"pwd=password;" & _
"uid=user;"
conn.Open
MsgBox "open"
recs.Open "select * from table", conn
MsgBox "recordset"
Exit Sub
errorhandler:
Text1 = Err.Number & " " & Err.Description
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top