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!

Visual Basic and ADO 1

Status
Not open for further replies.

glove

Technical User
Aug 24, 2000
42
US
When I use the following code:

Private mCN as Connection
Private mRS as New Recordset

Private Sub OpenConnection(strPath as String)
If Not (mCN Is Nothing) then
mCN.close
set mCN = nothing
End if

Set mCN = New Connection

With mCN

.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" _
& Strpath
.cursorlocation = adUseClient
.Open
End with
End Sub

I get the following Error:

"Run Time Error 3706 --- ADO could not find the specified provider"

Any suggestions? [sig][/sig]
 
"Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" & strpath

Try this
[sig][/sig]
 
This works

dim mCN
dim mRS

set mCN =new ADODB.connection
set mRS= new ADODB.recordset

mCN.Provider="Microsoft.jet.oledb.3.51"
mCN.Open "data source=" & strPath & ";user id=admin;Persist Security Info=False"


[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top