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

SQL Server return codes or something in that matter

Status
Not open for further replies.

bOEmAN

Programmer
Apr 30, 2002
4
0
0
BE
When the application starts it tries to connect to an SQL Server DB. When it cannot connect, it creates a new database, then instantly creates tables, wich apparently doesn't work.

The DB creation connection connects to the master DB, the second connection connects to the DB just created. But when the second connection(create tables) tries to connect it throws an error saying it cannot login under that name.

When I put in a breakpoint and wait a few seconds and then continue, the second connection connects and creats the tables.

This means that the server can't keep up with creating the DB and setting the users so that the rights aren't set and the second connection cannot yet login.

Is there any way that I can let the server return a code when the DB is created and the application can continue creating the tables?

Regards,
bOEmAN®
 
Problem solved with some nifty exception handling...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top