pb连接数据库问题

tangchangxin 2008-04-09 12:23:50
string ls_inifile ="dsmis.ini"
sqlca.DBMS = ProfileString (ls_inifile, "database", "dbms", "")
sqlca.database = ProfileString (ls_inifile, "database", "database", "")
sqlca.logid = ProfileString (ls_inifile, "database", "logid", "")
sqlca.logpass = ProfileString (ls_inifile, "database", "LogPassWord","")
sqlca.servername=ProfileString(ls_inifile,"database", "servername", "")
sqlca.dbparm = ProfileString (ls_inifile, "database", "dbparm", "")
sqlca.userId = ProfileString (ls_inifile, "database", "userId", "")
sqlca.DBPass = ProfileString (ls_inifile, "database", "DBPass", "")
sqlca.Lock = ProfileString (ls_inifile, "database", "Lock", "")
sqlca.autocommit=false;
connect using sqlca;
if sqlca.sqlcode <>0 then
messagebox("数据库连接","sqlca.sqlerrtext")
return
else
open(mian)
end if
我运行的时候提示sqlca.sqlerrtext。请各位帮我看看是那里出了问题啊
...全文
275 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
knowledge_Is_Life 2008-05-01
  • 打赏
  • 举报
回复
有点难度哦
meiZiNick 2008-05-01
  • 打赏
  • 举报
回复
什么呀
UltraBejing 2008-04-30
  • 打赏
  • 举报
回复
接分是王道!
小潜s 2008-04-09
  • 打赏
  • 举报
回复
messagebox("数据库连接","sqlca.sqlerrtext")
改成
messagebox("数据库连接",sqlca.sqlerrtext)
tangchangxin 2008-04-09
  • 打赏
  • 举报
回复
我用跟棕方式查看ls_inifile,这个值不直都没有变过。
v888 2008-04-09
  • 打赏
  • 举报
回复
这个要看dsmis.ini里面的配置
I_am_Z 2008-04-09
  • 打赏
  • 举报
回复
你的数据库连接的关键字都是取自ini文件。
将ProfileString (ls_inifile, "database", "dbms", "") 定义变量后逐个查看是否有返回值。
springlyn 2008-04-09
  • 打赏
  • 举报
回复
messagebox函数的格式
MessageBox ( title, text {, icon {, button {, default } } } )
有以下参数:
title表示的是messagebox的标题,类型为string ;

text表示的是messagebox需要显示的内容,类型为string ;

以下为可选项:
icon表示的是messagebox中要显示的图标,为枚举类型,有以下合法值:information! (消息,默认值);StopSign!(错误);Exclamation!(提示);Question!(提问);None!(不显示图标) ;

button表示的是messagebox中要显示的按键,为枚举类型,有以下合法值:OK!(确定,默认值);OKCancel!(确定,取消);YesNo!(是,否);YesNoCancel!(是,否,取消);RetryCancel!(重试,取消);AbortRetryIgnore!(中断,重试,忽略);

default表示的是messagebox中作为默认按钮的按键,其值为:1(默认值);2;3

messagebox函数返回值为integer。执行成功则返回所选择的按键的值,失败返回-1;若任意参数为null,则返回null

754

社区成员

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

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