如何获得dbexpress操作interbase和oracle数据库的错误代码?

simonqsm 2003-08-22 08:15:30
如何获得dbexpress操作interbase和oracle数据库的错误代码?
...全文
113 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
耙子 2004-03-17
  • 打赏
  • 举报
回复
.....
UIBError_210016 = 'Average data length: %s, total dup: %ld, max dup: %ld';
UIBError_210017 = 'Fill distribution:';
UIBError_210018 = 'Expected data on page %ld';
UIBError_210019 = 'Expected b-tree bucket on page %ld from %ld';
UIBError_210020 = 'unknown switch "%s"';
UIBError_210021 = 'Available switches:';
UIBError_210022 = '-a analyze data and index pages';
UIBError_210023 = '-d analyze data pages';
UIBError_210024 = '-h analyze header page';
UIBError_210025 = '-i analyze index leaf pages';
UIBError_210026 = '-l analyze log page';
UIBError_210027 = '-s analyze system relations';
UIBError_210028 = '-z display version number';
UIBError_210029 = 'Can''t open database file %s';
UIBError_210030 = 'Can''t read a database page';
UIBError_210031 = 'System memory exhausted';
UIBError_210032 = '-u username';
UIBError_210033 = '-p password';
UIBError_210034 = '-r analyze record versions';
UIBError_210035 = '-t analyze specific tables';

2887 messages found.
耙子 2004-03-17
  • 打赏
  • 举报
回复
相应的DBExpress驱动同时还应该提供一个xxx.msg文件,比如interbase的驱动提供了interbase.msg,里面就是错误信息和代码。

UIB提供了一个这个msg的reader

读出来类似这样的内容

UIBError_1 = 'arithmetic exception, numeric overflow, or string truncation';
UIBError_2 = 'invalid database key';
UIBError_3 = 'file %s is not a valid database';
UIBError_4 = 'invalid database handle (no active connection)';
UIBError_5 = 'bad parameters on attach or create database';
UIBError_6 = 'unrecognized database parameter block';
UIBError_7 = 'invalid request handle';
UIBError_8 = 'invalid BLOB handle';
UIBError_9 = 'invalid BLOB ID';
UIBError_10 = 'invalid parameter in transaction parameter block';
UIBError_11 = 'invalid format for transaction parameter block';
UIBError_12 = 'invalid transaction handle (expecting explicit transaction start)';
UIBError_13 = 'internal gds software consistency check (%s)';
UIBError_14 = 'conversion error from string "%s"';
UIBError_15 = 'database file appears corrupt (%s)';
UIBError_16 = 'deadlock';
UIBError_17 = 'attempt to start more than %ld transactions';
UIBError_18 = 'no match for first value expression';
UIBError_19 = 'information type inappropriate for object specified';
UIBError_20 = 'no information of this type available for object specified';
UIBError_21 = 'unknown information item';
UIBError_22 = 'action cancelled by trigger (%ld) to preserve data integrity';
UIBError_23 = 'invalid request BLR at offset %ld';
UIBError_24 = 'I/O error for file %.0s"%s"';
UIBError_25 = 'lock conflict on no wait transaction';
UIBError_26 = 'corrupt system table';
UIBError_27 = 'validation error for column %s, value "%s"';
UIBError_28 = 'no current record for fetch operation';
UIBError_29 = 'attempt to store duplicate value (visible to active transactions) in unique index "%s"';
UIBError_30 = 'program attempted to exit without finishing database';
UIBError_31 = 'unsuccessful metadata update';
UIBError_32 = 'no permission for %s access to %s %s';

错误代码和错误信息。
我想找个汉化的,估计没有:(
beyondtkl 2004-03-17
  • 打赏
  • 举报
回复
我刚测试的

with SQLQuery1 do
begin
Close;
SQL.Clear;
SQL.Text := 'SELECT seq1 FROM bom1';
try
Open;
except
on e:EDBEngineError do
//ShowMessage(pchar(e.Message));
ShowMessage(pchar(e.Errors[0].ErrorCode));
end;
end;

OK.
sixgj 2003-08-22
  • 打赏
  • 举报
回复
应该是有个文件专门是用来做系统错误的,打开它编辑看看了。

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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