SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Initial Catalog value ignored on SQL connection


Initial Catalog value ignored on SQL connection

Author
Message
dnjanson
dnjanson
Old Hand
Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)

Group: General Forum Members
Points: 388 Visits: 221

We are trying to use NT authentication in our VB6 programs. We have test and production databases and are trying to test programs using the TEST database, but whenever we set a connection string in VB the SQL statements using that connection string seem to be ignoring the Initial Catalog setting. It only recognizes the user's default database. Here's the connection string:

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=TestJobTrack;Data Source=BSQL;Application Name=ClientAudit

The user testing this program has a default database setting of ProdJobTrack and whenever this user runs this program, it only sees ProdJobTrack data. This is extremely frustrating as I have looked at several websites for connection string information and I can't see what we are doing wrong - I guess I've just been looking at it too long. Can anyone help??????





dnjanson
dnjanson
Old Hand
Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)

Group: General Forum Members
Points: 388 Visits: 221

This is classic, the programmer told me this was the connection string they were using. But when I looked at the program I FINALLY found one little problem:

Initial_Catalog

that should have been

Initial Catalog

Looks like it just ignored this parameter which then forced the connection to use the user's default database.





Bradley McGuffey
Bradley McGuffey
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 33
I'm going to put myself out there as the possible idiot developer who is having the same issue. Here is my connection string, which does not have the same issue as the post before, but is still having the Initial Catalog value ignored.

Data Source=DevSQL01;Inital Catalog=dbStage;Integrated Security=SSPI;Auto Translate=False;Application Name=MRM;

The issue surfaced where an older developed SSIS package updated to VS 2010 seems to have worked until my last update. The server running the SSIS package is SQL Server 2012 connecting to a 2012 database.

Any help would be appreciated.
Shawn Melton
Shawn Melton
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2341 Visits: 3513
Bradley McGuffey (10/29/2013)
I'm going to put myself out there as the possible idiot developer who is having the same issue. Here is my connection string, which does not have the same issue as the post before, but is still having the Initial Catalog value ignored.

Data Source=DevSQL01;Inital Catalog=dbStage;Integrated Security=SSPI;Auto Translate=False;Application Name=MRM;

The issue surfaced where an older developed SSIS package updated to VS 2010 seems to have worked until my last update. The server running the SSIS package is SQL Server 2012 connecting to a 2012 database.

Any help would be appreciated.

Best to create another thread instead, you would want to create yours in the SQL Server 2012 General forum. They don't have one for SSIS for some reason.

Shawn Melton
PS C:\>(Find-Me).TwitterURL
@wsmelton
PS C:\>(Find-Me).BlogURL
meltondba.wordpress.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search