Dim CN As New ADODB.Connection '定义数据库的连接
Dim Rs As New ADODB.Recordset
CN.ConnectionString = "Provider=sqloledb;Data Source=200;Initial Catalog=autoinfo;User Id=myh;Password=bscr79403;"
CN.Open
----
兄弟这段代码支持远程sql数据库放问吗。
Dim Rs As New ADODB.Recordset
CN.ConnectionString = "Provider=sqloledb;Data Source=200;Initial Catalog=autoinfo;User Id=myh;Password=bscr79403;"
CN.Open
----
兄弟这段代码支持远程sql数据库放问吗。
如:
Connect via an IP address:cN.ConnectionString = "Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=asdasd;" (DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source is the port to use (1433 is the default))
DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source is the port to use (1433 is the default))
这两句什么意思?
可这样好像连接速度方面会下降,如果一定要用计算机名要怎么做?