| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 534 人关注过本帖
标题: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
快速回复:delphi
数据加载中...
 
   



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

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