Click to See Complete Forum and Search --> : Database Access


Drew
April 6th, 2001, 07:43 AM
I still am having problems accessing my database through my Adodc control.
I put the database in the came folder as the program and in the data link properties
under the connection tab i put the database name.
I also code in the Private Sub Form_Laod()
Dim dbName As String
dbName = App.Path & "\NameandPassords.mdb"
It still will not access the database. What am I doing wrong?

samantha72
April 6th, 2001, 08:01 AM
Hi,

This is how I connected to an Access database.
Try this
dim cnn as connection

Set cnn = New ADODB.Connection
cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=C:\working\db1.mdb"
cnn.CursorLocation = adUseClient
cnn.Open

I hope this helps
Sam

Drew
April 6th, 2001, 11:40 AM
Thanks!! I'll try that.