Home All Groups Group Topic Archive Search About

Connection string problem

Author
17 Dec 2005 3:41 PM
John
Hi

I have a typical vs2005/sqlexpress2005/sqlserver2005 setup. I am using the
following connection string;

<add name="Membership" connectionString="Data Source=.\SQLEXPRESS;Integrated
Security=True;User
Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"/>

with sqlexpress 2005 and it works fine. Now I have run the aspnet_regsql.exe
tool to create the aspnetdb db against the sql server 2005 (default
server?). When I switch the above the string to the following;

<add name="Membership" connectionString="Data Source=.\;Integrated
Security=True;User
Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"/>

to connect to the sql server 2005 I get the following error;

System.Data.SqlClient.SqlException: The user instance login flag is not
supported on this version of SQL Server. The connection will be closed.

What is the problem and how can I fix it?

Thanks

Regards

Author
17 Dec 2005 4:35 PM
Jens
Just leave the "\" from the data source.

HTH, jens Suessmeyer.
Author
18 Dec 2005 10:44 AM
John
Using this now;

<add name="Membership" connectionString="Data Source=.;Integrated
Security=True;User
Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"/>

Still getting the error;

System.Data.SqlClient.SqlException: The user instance login flag is not
supported on this version of SQL Server. The connection will be closed.

Show quote
"Jens" <J***@sqlserver2005.de> wrote in message
news:1134837350.473764.76570@g44g2000cwa.googlegroups.com...
> Just leave the "\" from the data source.
>
> HTH, jens Suessmeyer.
>

AddThis Social Bookmark Button