救急!有关ODBC的问题

tsting 2001-11-21 10:56:42
我用的是Access数据库,用PB连接时出现
catalog tables could not be created and are not abailable for use
在运行时出现如下错误提示
select error:SQLTATE=07001
[Microsoft][ODBC Microsoft Access 驱动程序]参数不足,期待是1

我的代码是:
SQLCA=create Transaction
SQLCA.DBMS="ODBC"
SQLCA.Autocommit=False
SQLCA.DBPARM="comectstring='DSN'=tspbl'"
connect using sqlca
if sqlca.sqlcode<0 then
return()
end if
open (main)
...全文
147 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
llsyhy 2001-11-23
  • 打赏
  • 举报
回复
你的问题我也遇到过,你得重新检查你做的每一个窗体是否settransobject(sql),只要其中,任何一个没有和数据库相联都会出错,还有数据窗体检索的参数,你可能没有定义。
tsting 2001-11-23
  • 打赏
  • 举报
回复
我的问题还没有解决,大家伙帮个忙?
humb 2001-11-21
  • 打赏
  • 举报
回复
非常同意pbsql(风云)的说法
pbsql 2001-11-21
  • 打赏
  • 举报
回复
数据源连接参数不足,缺帐号、密码,SQLCA.DBPARM应这样:SQLCA.DBPARM="ConnectString='DSN=swnet;UID=帐号;PWD=密码'"
Sur_ 2001-11-21
  • 打赏
  • 举报
回复
去http://www.sybase.com.cn/cn/content/goto.jsp?resID=103下载补丁。
unwisdow 2001-11-21
  • 打赏
  • 举报
回复
用我的例子试试!
sqlca.dbms = "ODBC"
sqlca.database = "my_db"
sqlca.logid = "dba"
sqlca.logpass = "sql"
sqlca.dbparm = "Connectstring="
sqlca.AutoCommit = False
if Upper(sqlca.dbms) = 'ODBC' then sqlca.dbparm += "'DSN=" + sqlca.database + ";UID=" + sqlca.logid + ";PWD=" + sqlca.logpass + "'"
if isnull(sqlca.dbms) or trim(sqlca.dbms) = '' then
sqlca.dbparm = "CommitOnDisconnect='No'"
else
sqlca.dbparm += ",CommitOnDisconnect='No'"
end if
connect;

if sqlca.sqlcode <> 0 then
MessageBox("错误","数据库连接失败!")
Return
end if
unwisdow 2001-11-21
  • 打赏
  • 举报
回复
不要SQLCA=create Transaction这句试试?我没见过这种用法。
tsting 2001-11-21
  • 打赏
  • 举报
回复
to: pbsql(风云) 
我试了一下,还是不行,我想问题不在这。我在连接时说
catalog tables could not be created and are not abailable for use
高手们快帮帮我:)

1,076

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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