Sql connection-string for localhost server

前端 未结 13 2148
遇见更好的自我
遇见更好的自我 2020-12-09 01:28

I am newbie in this .NET and please don\'t mind in answering my simple question. I am trying to write a windows application, where in I am using a localhost SQLserver for da

13条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-09 01:47

    When using SQL Express, you need to specify \SQLExpress instance in your connection string:

    string str = "Data Source=HARIHARAN-PC\\SQLEXPRESS;Initial Catalog=master;Integrated Security=True" ;
    

提交回复
热议问题