数据库为什么无法连接?

petertangh 2001-12-15 06:34:07
我在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会不会和他有关?
...全文
54 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
yiyu 2001-12-15
  • 打赏
  • 举报
回复
在PB中Profile连接正常吗?

如果正常那说明你客户端配置有问题,如果不正常请重新安装PB,选好数据库接口。
KittyWang 2001-12-15
  • 打赏
  • 举报
回复
可能问题
1 数据的DLL安装没有
2 AUTOEXEC.BAT中没有PB的路经
rabbitsfoot 2001-12-15
  • 打赏
  • 举报
回复
可能是你的直连所用的DLL文件找不到了!

752

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧