July 26th, 2000, 11:11 AM
Dear ladies and gentlemen,
I am trying to use ADODB.Connection
My code is working fine without the password but if I try to create database password I got the following error:
Run time error ‘-2147467259(80004005):
Could not find installable ISAM.
The following is my code:
Private Sub Form_Load()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim sSQLAs String
Set cn = New ADODB.Connection
cn.ConnectionString = "provider =Microsoft.Jet.OLEDB.4.0; " & _
"data source = \\servername\DatabaseName.mdb;" & _
"pwd=password;"
cn.Open
Set rs = New ADODB.Recordset
sSQL= "SELECT * FROM table;"
rs.Open sSQL, cn
rs.MoveFirst
Combo1.Clear
Do While Not rs.EOF
Combo1.AddItem rs!field_name
rs.MoveNext
Loop
End Sub
Thanks in advance for your help.
John
I am trying to use ADODB.Connection
My code is working fine without the password but if I try to create database password I got the following error:
Run time error ‘-2147467259(80004005):
Could not find installable ISAM.
The following is my code:
Private Sub Form_Load()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim sSQLAs String
Set cn = New ADODB.Connection
cn.ConnectionString = "provider =Microsoft.Jet.OLEDB.4.0; " & _
"data source = \\servername\DatabaseName.mdb;" & _
"pwd=password;"
cn.Open
Set rs = New ADODB.Recordset
sSQL= "SELECT * FROM table;"
rs.Open sSQL, cn
rs.MoveFirst
Combo1.Clear
Do While Not rs.EOF
Combo1.AddItem rs!field_name
rs.MoveNext
Loop
End Sub
Thanks in advance for your help.
John