怎么捕捉不到错误?(20)

  • 主题发起人 极品铁观音
  • 开始时间

极品铁观音

Unregistered / Unconfirmed
GUEST, unregistred user!
trywith ADO_shd do begin close
sql.clear
sql.add('insert into zL_grou(s_num,h_num)')
sql.Add('values:)s_num,:h_num)')
Parameters.parambyname('h_num').value:=edit1.text
// Parameters.ParamByName('s_num').value:='12121 '
execsql
end
except on E: Exception do showmessage('错误信息:'+e.Message)
end;上面//的那句在数据库中为键值,不允空的,我故意杠掉是为了试try语句,但捕捉不到,还是windows的出错语句,写得不对吗,请指教。
 
W

wojiuxihuan

Unregistered / Unconfirmed
GUEST, unregistred user!
在Delphi的IDE环境下是看不到异常错误的你直接运行硬盘上的.exe可执行文件 异常情况下就能捕捉到异常
 

极品铁观音

Unregistered / Unconfirmed
GUEST, unregistred user!

Similar threads

S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
786
import
I
I
回复
0
查看
532
import
I
回复
0
查看
378
极品铁观音
顶部