需要将客户端PC上的应用程序(C#-forms)与服务器上的数据库连接(sql server 2014) 我尝试这个(这使我的形式可以从应用程序更改而无需编码)
sqlconnection = new SqlConnection(@"Server=" + Properties.Settings.Default.server + "; Database=" + Properties.Settings.Default.database + "; Integrated Security=false; User ID=" + Properties.Settings.Default.ID + "; password="+ Properties.Settings.Default.password +"");
我输入这样的数据
TCP:PCNAME,端口
sql_server_username
sql_server_password
它在服务器上工作但是当我在客户端PC上试用它时没有工作。
提示:(服务器用户名不是与sql_server用户名相同)