752
社区成员
发帖
与我相关
我的任务
分享
B+SQLSever的连接语句:
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString = '" &
+"DRIVER=SQL Server" &
+";UID=用户名" &
+";DATABASE=new_start" &
+";APP=Microsoft Data Access Components" &
+";SERVER=" + ls_server &
+";PWD=密码"
CONNECT USING SQLCA;
IF SQLCA.SQLCode <> 0 THEN
MessageBox("数据库连接失败","请与管理员联系。错误号:" + String(SQLCA.SQLCode) + "~r~n错误原因:" + SQLCA.SQLErrText)
RETURN
end if
// Profile master
SQLCA.DBMS = "MSS Microsoft SQL Server"
SQLCA.Database = "master"
SQLCA.LogPass = <***************>
SQLCA.ServerName = "127.0.0.1"
SQLCA.LogId = "sa"
SQLCA.AutoCommit = False
SQLCA.DBParm = ""