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

Error Message when starting application

Status
Not open for further replies.

Hawkster

Programmer
Nov 12, 2001
10
GB
I've written a little application using a VB front end connecting to a SQL Server 7 Backend. Obviously I can connect to it and I've managed to installed the application on a different users computer but when I've tried running the application of various other users computers I get an error message saying

-2147467259 cannot open user default database <ID>. Using master instead.

Now i've checked obvious things like OS, service packs etc and the actual computers seem identical. Can someone please point me in the right direction, I think it might be a server problem ?????

Cheers
 
Is your VB App using ODBC to connect to the server? If so have you checked out to see if the client computer has a correct ODBC System DSN set up.

Rick.
 
Rick, I've fixed this problem by running sp_defaultdb and setting the default database for the login name. Found this browsing through microsoft help files. Not sure what this stored procedure does tho, but it worked.
 
Just for background information:

Go to the security folder in Enterprise Manager then onto Logins and double click on a login. Then at the bottom of the general tab displayed you will see the default database which is assigned to the login. This can be changed here which is the same as running sp_defaultdb.

When a client connects with SQL Server, the default database defined for its login becomes the current database.

Rick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top