数据库为什么无法连接?
我在project的open里写入了如下代码:
SQLCA.DBMS = ProfileString("pb.ini","database", "DBMS", " ")
SQLCA.Database = ProfileString("pb.ini","database", "Database", " ")
SQLCA.LogId = ProfileString("pb.ini","database", "LogId", " ")
SQLCA.LogPass = ProfileString("pb.ini","database", "LogPassword", " ")
SQLCA.ServerName = ProfileString("pb.ini","database", "ServerName", " ")
SQLCA.UserId = ProfileString("pb.ini","database", "UserId", " ")
SQLCA.DBPass = ProfileString("pb.ini","database", "DatabasePassword", " ")
SQLCA.lock = ProfileString("pb.ini","database", "lock", " ")
open(w_main)
在主窗口写入了如下代码:
// Connect to the database.
CONNECT USING SQLCA;
IF SQLCA.SQLCode <> 0 THEN
MessageBox("Connect Failed", &
"Cannot connect to database " &
+ SQLCA.SQLErrText)
RETURN
END IF
dw_datawindow.SetTransObject(SQLCA)
dw_datawindow.Retrieve()
点击run后出现一消息框(Connect Failed)内容为:
Cannot connect to database DBMS is not suooirted in your current installation
顺便提一下我用的系统是windowxp,pb8.0会不会和他有关?