Visual Studio 2019连接自动的Sql Server开发版数据库(C#语言)
生活随笔
收集整理的這篇文章主要介紹了
Visual Studio 2019连接自动的Sql Server开发版数据库(C#语言)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Visual Studio 2019連接自動的Sql Server開發版數據庫,C#語言
連接字符串:
server=(LocalDB)\MSSQLLocalDB;database=master;integrated security=true
?
try {SqlConnection connection = new SqlConnection(@"server=(LocalDB)\MSSQLLocalDB;database=master;integrated security=true");connection.Open();Console.WriteLine("連接成功");connection.Close(); } catch {Console.WriteLine("連接失敗"); }?
總結
以上是生活随笔為你收集整理的Visual Studio 2019连接自动的Sql Server开发版数据库(C#语言)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C#编程语言之读取网页内容(微软官网方法
- 下一篇: C#委托的介绍(delegate、Act