我看那个网站了 下面这个是通过IP连接 Library=DBMSSOCN 这个不懂 他该写什么 Connect via an IP address Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword; 介绍是这样的DBMSSOCN=TCP/IP. This is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server. GOOGLE翻译是DBMSSOCN = TCP / IP协议。这是如何使用TCP /而不是命名管道的IP。在数据源端要使用的端口。 1433是SQL Server的默认端口。不过没看懂
我现在局域网测试都不好使 MySqlConnection con = new MySqlConnection("Server=192.168.1.20/localhost;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice"); 这个是IP后面加 服务器名吧 MySqlConnection con = new MySqlConnection("Server=192.168.1.20,localhost;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice"); 这个也是 /换, MySqlConnection con = new MySqlConnection("Server=192.168.1.20,ROOT;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice"); 这个是IP后面加用户名MySqlConnection con = new MySqlConnection("Server=192.168.1.20/ROOT;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice"); 同上 MySqlConnection con = new MySqlConnection("Server=192.168.1.20;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice"); 这个是直接IP的 都是局域网的
MySqlConnection con = new MySqlConnection("Server=192.168.1.20/3306;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice"); 这个是端口号的MySqlConnection con = new MySqlConnection("Server=192.168.1.20,3306;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice"); 同上 也不好使
或者写server=localhost现在写 server=要连接电脑的IP
我看那个网站了 下面这个是通过IP连接 Library=DBMSSOCN 这个不懂 他该写什么
Connect via an IP address
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
介绍是这样的DBMSSOCN=TCP/IP. This is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server.
GOOGLE翻译是DBMSSOCN = TCP / IP协议。这是如何使用TCP /而不是命名管道的IP。在数据源端要使用的端口。 1433是SQL Server的默认端口。不过没看懂
不行的话。 存储过程也可以、 读XML获取也行
new MySqlConnection("Server=192.168.1.20/localhost;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice");
这个是IP后面加 服务器名吧 MySqlConnection con =
new MySqlConnection("Server=192.168.1.20,localhost;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice");
这个也是 /换,
MySqlConnection con =
new MySqlConnection("Server=192.168.1.20,ROOT;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice");
这个是IP后面加用户名MySqlConnection con =
new MySqlConnection("Server=192.168.1.20/ROOT;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice");
同上
MySqlConnection con =
new MySqlConnection("Server=192.168.1.20;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice");
这个是直接IP的 都是局域网的
MySqlConnection con =
new MySqlConnection("Server=192.168.1.20/3306;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice");
这个是端口号的MySqlConnection con =
new MySqlConnection("Server=192.168.1.20,3306;User Id=root;Password=aido;Persist Security Info=True;Database=adoffice");
同上
也不好使