2drunk2funk
MIS
I am developing an App in Access 2003 and prior to this have always used DAO for the coding. (I know, get with the times etc
)
I thought I would use this project to move to ADO but have come across a problem.
I was trying to do an ADO connection so I could use a transaction around a number of updates.
code:
--------------------------------------------------------------------------------
Set con_db = New ADODB.Connection
con_db.CursorLocation = adUseClient
con_db.Mode = adModeShareDenyNone
con_db.Open CurrentProject.Connection
con_db.BeginTrans
--------------------------------------------------------------------------------
The trouble is the Open returns me an error message "The database has been placed in a state by user 'Admin' on machine....."
The database has no password, no security setup in workgroups at the moment.
The database is set to shared.
If I just use a recordset;
code:
--------------------------------------------------------------------------------
Set rec_ard = New ADODB.Recordset
rec_ard.CursorLocation = adUseClient
rec_ard.Open "reservation_detail", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
--------------------------------------------------------------------------------
It works fine, so why not the connection object for transaction control?![[3eyes] [3eyes] [3eyes]](/data/assets/smilies/3eyes.gif)
Sounds like an obvious lock but Admin account has full access, No DB password, set as shared etc etc
What little bit am I missing ?
Hope you can help.
![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)
I thought I would use this project to move to ADO but have come across a problem.
I was trying to do an ADO connection so I could use a transaction around a number of updates.
code:
--------------------------------------------------------------------------------
Set con_db = New ADODB.Connection
con_db.CursorLocation = adUseClient
con_db.Mode = adModeShareDenyNone
con_db.Open CurrentProject.Connection
con_db.BeginTrans
--------------------------------------------------------------------------------
The trouble is the Open returns me an error message "The database has been placed in a state by user 'Admin' on machine....."
The database has no password, no security setup in workgroups at the moment.
The database is set to shared.
If I just use a recordset;
code:
--------------------------------------------------------------------------------
Set rec_ard = New ADODB.Recordset
rec_ard.CursorLocation = adUseClient
rec_ard.Open "reservation_detail", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
--------------------------------------------------------------------------------
It works fine, so why not the connection object for transaction control?
![[3eyes] [3eyes] [3eyes]](/data/assets/smilies/3eyes.gif)
Sounds like an obvious lock but Admin account has full access, No DB password, set as shared etc etc
What little bit am I missing ?
Hope you can help.