标题:delphi
只看楼主
abc0595
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-4-30
 问题点数:0 回复次数:1 
delphi

Function TForm1.My_Execute(id:integer;cstr:string;ADOQuery:TADOQuery):integer;
Begin
result:=0;
Try
ADOQuery.Close;
ADOQuery.SQL.Text :=cstr;
If id=0 Then ADOQuery.Open;
If id=1 Then Begin
ADOQuery.ExecSQL;
End;
Except
on E:exception Do Begin
showmessage(e.Message);
result:=1;
End;
End;
End;这段中,怎么理解阿,特别是这一句,on E:exception Do Begin
请大家帮帮忙,

搜索更多相关主题的帖子: delphi 
2007-05-10 10:55
nongen
Rank: 5Rank: 5
来 自:网络
等 级:贵宾
威 望:17
帖 子:322
专家分:0
注 册:2006-11-25
得分:0 

An exception handler can specify an identifier before the name of the exception class. This declares the identifier to represent the exception object during execution of the statement that follows on...do. The scope of the identifier is limited to that statement. For example,

try
...
except
on E: Exception do ErrorDialog(E.Message, E.HelpContext);
end;


昨天不是我的,明天不是你的,今天却是我们的。
http://www.
2007-05-10 12:09



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-138156-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.070072 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved