Connection String to Connect to .MDF

后端 未结 3 1105
名媛妹妹
名媛妹妹 2020-12-10 02:16

I\'ve created a new project in VS2008, and added a .MDF file to the project. This is the first time I\'ve tried to use the MDF files and .SQLEXPRESS databases (I\'ve always

3条回答
  •  一整个雨季
    2020-12-10 03:07

    For a local DB and no SQLEXPRESS server:

    "Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=""|DataDirectory|\MyDB.mdf"";Integrated Security=True;Connect Timeout=30"
    

提交回复
热议问题