用于连接SQL SERVER Express数据库的连接字符串以及如何使用我的应用程序设置该数据库.....
答案 0 :(得分:0)
以下代码段可以帮助您入门。
SQLConnectionStringBuilder bldr = new SQLConnectionStringBuilder
bldr.DataSource = "Server" //Put your server or server\instance name here. Likely YourComputerName\SQLExpress
bldr.InitialCatalog = "MyDB" //The database on the server that you want to connect to.
bldr.UserID = "SomeUser" //The user id
bldr.Password = "SomePassword" //The pwd for said user account
SQLConnection myConnection = new SQLConnection(bldr.ConnectionString)