traceMe
10-31-03, 04:33 AM
I have access database and vb6.0 to work on. i dont know how to connect the database through vb here is the code that i have written
i get "unrecognized database format 'd:\shop\shop.mdb'."
i have set references to microsoft ActiveX Data Objects 2.0 Library
is there any other references that i have to set to access ms access database
This is my code which is placed in onclick action of button
Set conShop = New Connection
Set rsShop = New Recordset
With conShop
.Provider = "MICROSOFT.JET.OLEDB.3.51"
.ConnectionString = "data Source= d:/shop/shop.mdb"
.Open
End With
rsShop.Open "select * From [user] where username='" & Trim(txtName.Text) & "' and pwd='" & Trim(txtPwd.Text) & "'", conShop, adLockOptimistic, adOpenDynamic
If txtName = "test" Then
frmAdmin.Show
Else
MsgBox "Incorrect Username Or Password"
End If
this is really very urgent if people can help me
that would be great full
i get "unrecognized database format 'd:\shop\shop.mdb'."
i have set references to microsoft ActiveX Data Objects 2.0 Library
is there any other references that i have to set to access ms access database
This is my code which is placed in onclick action of button
Set conShop = New Connection
Set rsShop = New Recordset
With conShop
.Provider = "MICROSOFT.JET.OLEDB.3.51"
.ConnectionString = "data Source= d:/shop/shop.mdb"
.Open
End With
rsShop.Open "select * From [user] where username='" & Trim(txtName.Text) & "' and pwd='" & Trim(txtPwd.Text) & "'", conShop, adLockOptimistic, adOpenDynamic
If txtName = "test" Then
frmAdmin.Show
Else
MsgBox "Incorrect Username Or Password"
End If
this is really very urgent if people can help me
that would be great full