all groups > sql server odbc > november 2004 >
You're in the

sql server odbc

group:

DATABASE= or INITIAL CATALOG=?



DATABASE= or INITIAL CATALOG=? Maury Markowitz
11/24/2004 7:37:35 AM
sql server odbc: I'm setting up a DSN for a new SQL Server install, and had some problems with
an existing Access app. Every query resulted in an "object not found", and
after a little poking about it became clear that it was because the app was
connecting to "master" instead of our database.

The connection string in Access used "Database=[our database name]". Does
this actually work? Or did the app only work in the past because the default
database for that login was set to ours?

Is there a difference between DATABASE (which I inherited) and INITIAL
Re: DATABASE= or INITIAL CATALOG=? Maury Markowitz
11/24/2004 8:37:04 AM
[quoted text, click to view]

Hmmm. That being the case can you suggest any other reason for this problem?
The application logs into the correct server and attaches to master, even
Re: DATABASE= or INITIAL CATALOG=? Sue Hoegemeier
11/24/2004 9:20:34 AM
Yes, Database=YourDatabase does actually work.
Initial catalog is generally used when connecting with an
OLE DB provider.
Database is generally used when connecting with an ODBC
driver.
The following is a good resource for connection strings:
http://www.able-consulting.com/ADO_Conn.htm

-Sue

On Wed, 24 Nov 2004 07:37:35 -0800, Maury Markowitz
[quoted text, click to view]
Re: DATABASE= or INITIAL CATALOG=? Sue Hoegemeier
11/24/2004 10:03:04 AM
Using DSNs and connections strings is kind of a waste in my
opinion and can make the issues more convoluted. I have no
idea how the DSN and connection strings are being used but I
would just get rid of the DSN. You introduce maintenance
issues as well as you have your connection string in a DSN
and in code. So I'd eliminate that and just use dsn-less
connections.
Make sure the user exists in the database and can actually
access the database.

-Sue

On Wed, 24 Nov 2004 08:37:04 -0800, Maury Markowitz
[quoted text, click to view]
AddThis Social Bookmark Button