Connecting to local SQL Server database using C#

前端 未结 6 1839
后悔当初
后悔当初 2020-12-17 16:53

Suppose I have created a SQL Server database called Database1.mdf in the App_Data folder in Visual Studio with a table called Names. <

6条回答
  •  醉梦人生
    2020-12-17 17:02

    I like to use the handy process outlined here to build connection strings using a .udl file. This allows you to test them from within the udl file to ensure that you can connect before you run any code.

    Hope that helps.

提交回复
热议问题