Connecting to SQL Server through ODBC driver with master db as default db 
Author Message
 Connecting to SQL Server through ODBC driver with master db as default db

I have an application, written in MFC(through DAO).
This application connects to my database through ODBC driver which has
this db as a default db. Now I need to enable creating a new db from
the application or connecting to a different dbs. I understand that
connecting each time through a different driver with a different
default db is not correct. I assume that there must be a way to
connect to all databases and to create new ones through ODBC driver
with master db as a default db. The problem is that I don't know how.
Please instruct me how to connect to a db through a driver with master
db as default and how to create a new db through the same driver (if

When I create a new database, can I do it from the application using
one of already existing ODBC drivers, or do I have to create a
different driver with this new database as a default db.

Mon, 18 Apr 2005 18:21:11 GMT
 [ 1 post ] 

 Relevant Pages 

1. user's default db is always MASTER despite config'd to other db

2. [ODBC SQL Server Driver][SQL Server][OLE/DB provider returned message: Timeout expired]

3. Restore Master DB to db other than Master?

4. link server on sql server using ole db provider for odbc driver

5. Insert Date type variable through ODBC SQL Server Driver to datetime field in SQL 7.0 DB

6. DSN Default dB being overriden by Login's default dB

7. How to connect to ODBC DB thats not SQL Server

8. Connect to SQL Server dB failed using jdbc:odbc bridge

9. Visual Basic App using Foxpro DB vs Access DB vs SQL Server DB

10. users default DB is MASTER regardless of how configured

11. Rebuilding Master DB is not changing Default Sort Order ID

12. user's default db is MASTER regardless of configuration settings

Powered by phpBB® Forum Software