PB+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
希望你支持powerbulider !
学的都忘掉了 ...