PDA

Click to See Complete Forum and Search --> : Multiple user Access DB


rshovlain
Aug 20th, 1999, 03:37 AM
I am having a problem with multiple users attempting to open the same Access DB. When to users simultaneous try to access the db, an error occurs.

How do you check to see if the DB is able to be written to (not being written to by someone else)?

I am using the command
Set DB = Workspaces(0).OpenDatabase("dbname.mdb").OpenRecord("record") with the dbOpenDynaset

Thanks for the help!
Raymond

JHausmann
Aug 22nd, 1999, 02:22 AM
1)Set DB = Workspaces(0).OpenDatabase("dbname.mdb",false,false).OpenRecord("record") with the dbOpenDynaset

The structure of the open database method is:

OpenDatabase(dbname,options,readonly,connect)

if options= false (which is the default) it opens the database in in shared mode. If it is= true then the database is opened exclusively

Although, to be honest, it *already* should be opened to allow multiple users to read. I'd give some thought to dropping the .openrecord method and using an openrecordset in it's place. like:

1) opendatabase
2) openrecordset