Groups | Blog | Home
all groups > sql server connect > august 2007 >

sql server connect : database connection string problem


guosong0913 NO[at]SPAM gmail.com
8/29/2007 4:11:53 PM
Hi,

I am using dot net 1.1 framework to connect to one of my data base.
the connection string looks like following

"Data Source=.\SQLEXPRESS;AttachDbFilename=c:\DB1.mdf;Integrated
security=true;User Instance=True"

when I run my program without debugging, the exception of "unsupported
keyword User Instance" is thrown.

but when I run my program under debug mode, I could connect to my
database and get the data table I want.

any hint for this weird problem?

Thank you

Song
William Vaughn
8/30/2007 11:31:02 AM
Interesting. Consider that User Instance is ONLY supported on SQL Server
Express. Is there a chance you've installed the Workgroup, Standard or
Developer Edition on the system or the ConnectionString (which points to an
ambiguous local server) might be pointing to one of the above (non-Express
versions)?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

[quoted text, click to view]
Rick Byham, (MSFT)
8/31/2007 9:46:11 AM
You might have old (SQL Server 2000) network protocols installed. If so,
install the SQL Server 2005 Native Client.
--
Rick Byham (MSFT)
This posting is provided "AS IS" with no warranties, and confers no rights.

[quoted text, click to view]
AddThis Social Bookmark Button