Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening multiple instances of Access database in VB6 program

Status
Not open for further replies.

albaken

Programmer
Jan 22, 2001
9
0
0
US
I've written a very useful and productive program for the medical facility I work in. The problem is as follows: the program opens an Access 97 database that is stored on a network drive...the program itself is installed on four different computers which are linked to the network drive that contains the database...the database is password protected, this is taken care of at the logon screen...the problem arises when someone from computer #2 i.e., wants to use the program when someone on computer #1 is already using the database...the database is supposed to be shared, but only one person can use it at a time...I've tried the database properties in Access and it is supposed to be "shared" not exclusive...any help ???
 
How are you accessing the database? DAO, RDO, ADO, etc?
 
after getting through the login form successfully, the main form opens ...this is the (form load) procedure)...the varuious forms in the program use the data control



form (load)

On Error GoTo ErrorHandler

Dim dbs As Database

Set dbs = OpenDatabase("g:\****\****\***.mdb", True, False, ";pwd=****")

dbs.NewPassword "****", ""
dbs.Close
On Error GoTo 0

Exit Sub

ErrorHandler:

Select Case Err.Number

Case 3031

Set dbs = OpenDatabase("g:\****\****\***.mdb", True, False, ";pwd=")

dbs.NewPassword "", "****"
End Select
Resume

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top