改为这样
cServer = "192.168.180.110,1433"
cUid = "sa"
cPwd = "rsk123hlx"
cDbs = "zsgl"
cSql=[driver=sql server;server=]+cServer+[;uid=]+cUid+[;pwd=]+cPwd+[;database=]+cDbs
nHandle=sqlstringconnect(cSsql)
如果不行,不要用IP,改为名称
cServer = "你电脑上安装数据库的名称"
cUid = "sa"
cPwd = "rsk123hlx"
cDbs = "zsgl"
cSql=[driver=sql server;server=]+cServer+[;uid=]+cUid+[;pwd=]+cPwd+[;database=]+cDbs
nHandle=sqlstringconnect(cSsql)
如果还不行,就在本机上测试
cServer = "192.168.180.110,1433"
cUid = "sa"
cPwd = "rsk123hlx"
cDbs = "zsgl"
cSql=[driver=sql server;server=]+cServer+[;uid=]+cUid+[;pwd=]+cPwd+[;database=]+cDbs
nHandle=sqlstringconnect(cSsql)
如果不行,不要用IP,改为名称
cServer = "你电脑上安装数据库的名称"
cUid = "sa"
cPwd = "rsk123hlx"
cDbs = "zsgl"
cSql=[driver=sql server;server=]+cServer+[;uid=]+cUid+[;pwd=]+cPwd+[;database=]+cDbs
nHandle=sqlstringconnect(cSsql)
如果还不行,就在本机上测试