开发者

Connection SQL server C#

开发者 https://www.devze.com 2023-01-25 23:58 出处:网络
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开发者_StackOverflow社区 string

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开发者_StackOverflow社区 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消