View Full Version : ADO Dsnless Connection strings


jeaninescott
04-04-2001, 09:19 AM
Hello!
I am running into a strange error. I am using Access 2000 - ADO. I am not using a dsn. My connection string follows:


Set cnn1 = New ADODB.Connection
strCnn = "Driver={Microsoft Access Driver (*.mdb)};DBQ= C:\Windows\Desktop\equifax.mdb"

cnn1.Open strCnn
Set rsHeader = New ADODB.Recordset
rsHeader.CursorLocation = adUseClient
rsHeader.Open "SELECT * From [header record];", strCnn, adOpenDynamic, adLockOptimistic

then I close the connection at the end of the module like this:

cnn1.close
set cnn1 = nothing

What I am running into is an error quite often - it's error #-2147467259: " The database has been placed in a state by an unknown user that prevents it from being opened or locked"

Any ideas?

also, the recordset options seems to be very picky - I cannot use adLockPessimistic without getting the same error above...

Thanks for your help!

Jeanine