Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connecting string to SQL Server
Message
From
03/01/2012 10:09:06
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01532080
Message ID:
01532089
Views:
35
I think there is one too many \

Try
MyComputer\SQLExpress;database=MyDatabaseName;Trusted_Connection=Yes"

>Hi,
>
>When I am testing my ASP.NET to connect to SQL Server I use the following connecting string:
>
><pre>
>connString = "server=MYCOMPUTER\\SQLEXPRESS; database=MyDatabaseName; Trusted_Connection=Yes"
>
>
>But I get an error:
>
>
>Cannot open database "MyDatabaseName" requested by login. The login failed. 
>Login failed for user 'MYCOMPUTER\Dmitry' 
>
>
>I suppose the "Trusted_Connection" syntax is not recognized, right? What should I change in my connString?
>
>TIA
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform