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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi-user database problem 1

Status
Not open for further replies.

knulisch

Programmer
Oct 10, 2000
18
US
I am having a multi-user database problem with an access my VB6/Access 97.

Via ODBC, I am using a System DSN with a Microsoft Access Driver called "judge".

In my ADODC control on the form, I have the Connection String pointing to the ODBC judge. I have the CursorType set to Openkeyset, and the LockType to Pessimistic.

In the form code I do the following:
Set cn = New ADODB.Connection
cn.Open judgedatabase

When I execute the app form on one PC only everything works fine. However, if I open the app form on a second PC then I get the error "[Microsoft][ODBC Microsoft Access Driver] Cannot open database '(unknown)'. It may not be a database that your application recognizes, or the file may be corrupt.

I have tried some other things without any success and I feel like I am missing something simple. Any help would be appreciated.

Thanks.
 
The database is located on a server. The ODBC System DSN points to that mdb on the server.
 
Can you see the DSN from the other PC? Try opening it and testing the connection to see if that PC has the proper rights to the sever.
 
I can run the app by itself on both PC's (actually more).
 
Go to tools, options and click the advanced tab and see what the default open mode is set to.
 
I am sorry that I can not offer any more suggestions for you. I try not to use DSNs at all, so my troubleshooting efforts are falling short. If you decide to lose the DSN and code your connection(which I feel is a better option ie.this post) let me know. I will be happy to help out.
 
Thanks for your help - I will probably try to get away from the DSN's. Is there a standard connection string that I should use for multi-user access?
 
Put the path of the .mdb in your connection string after Dbq=""

Dim cnConn as adodb.connection

set cnConn = createobject("adodb.connection")

cnconn.connectionstring = "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=\\YourServer\PathToDB;" & _
"Uid=Admin;Pwd=;"
cnconn.open
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top