我有一个阿里云服务器,服务器上有SQL Server数据库。我自己用c#写了一个WinForm图书管理系统,请问怎么连接到服务器上的数据库?
SQLserver开启远程连接:
http://www.cnblogs.com/xidu/p/4367968.html
http://www.cnblogs.com/shenbing/p/5935430.html
设置好防火墙(如果有)放行1433端口,如果配置为其他端口,注意防火墙
C#的连接对象字符串中服务器server设置为数据库ip地址就行了,其他和连接本地的配置一样
string strConnectionString= @"server=IP,端口;database=ChildrenERecord;Uid=child;Pwd=child";
http://www.cnblogs.com/quietwalk/archive/2010/09/15/1826833.html