Reputation: 7419
I have Installed SQL server 2008 I want to connect to it using c# i have managed to establish connection by using tools->Connect to database but when i write connection string and try to open the connection then exception occurs "Instance Failure". what is wrong my server name is NEO-SOFT-SOL\SQLEXPRESS and connection string I used is @"Data Source=NEO-SOFT-SOL\\SQLEXPRESS;Initial Catalog=user;Integrated Security=True";
what is wrong?
Upvotes: 2
Views: 237
Reputation: 56390
If you're using the @
symbol, then \\
really means two slashes, you probably want just one \
See the verbatim string literals documentation for some examples to help explain.
Upvotes: 7