vb远程连接SQL
怎么连接不上,远程桌面连接117.41.172.245:18918,服务器可以远程,在远程桌面上可以登录进sql数据库Dim CN As New ADODB.Connection
Dim strSQL As String
CN.ConnectionString = "Driver=SQL Server;Server=117.41.172.245,18918;uid=sa;pwd=123456;database=公证处系统数据库"
= 20
CN.Open
MsgBox "连接成功"
strSQL = "Insert into testtable(sn,sname,sex) Values('123','ABC','男')"
CN.Execute strSQL
CN.Close
[此贴子已经被作者于2018-5-28 17:04编辑过]