By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,107 Members | 1,318 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,107 IT Pros & Developers. It's quick & easy.

open mode : adModeShareDenyNone

P: 9
Hi All,

We use “adModeShareDenyNone” open mode to allow others users to connect to database at the same time.
But when I open database through one client on computer, other user(computer) can not connect to database. It gets an error saying “file already in use”.
What can be the reason?

Note :: I have distributed .exe (front end) to different users.

## some part of code (visual basic)
'declare connection
Dim ConDB As ADODB.Connection
'declare SQL command
Dim myCommand As ADODB.Command
'declare record set to store output of SQL command
Dim myRecordSet As ADODB.Recordset

'To catch run-time errors
'On Error Resume Next
'Setting connection object
Set ConDB = New ADODB.Connection
'creating new record set
Set myRecordSet = CreateObject("ADODB.Recordset")
'setting cursor type
myRecordSet.CursorType = adOpenStatic
'setting connection provider engine
ConDB.Provider = "Microsoft.Jet.OLEDB.4.0"

'clearing errors
Err.Clear
'let each user connect to database
ConDB.Mode = 16 'adModeShareDenyNone
'Opening connection
ConDB.Open CONNECTION_STRING <- declared constant in module
Dec 5 '08 #1
Share this Question
Share on Google+
1 Reply


FishVal
Expert 2.5K+
P: 2,653
Hello, Anane.

Access doesn't support all ADO features.
Try different connection modes or open it in default adModeUnknown.

Regards,
Fish
Dec 7 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.