Delphi ADOConnection1.Errors

Delphi ADOConnection1.Errors

Errors是Errors集合的实现。

语法原型:

property Errors: Errors;

描述:

  • 使用Errors直接访问TADOConnection组件表示的ADO连接对象的ADO Errors集合。此直接访问引用允许应用程序使用底层错误集合对象的属性和方法。访问底层连接对象对于利用TADOConnection中未出现的错误集合的属性和方法特别有用。
  • 连接对象的错误集合对象包含由提供程序生成的错误。对于每个提供程序错误,在Errors集合中放置一个或多个ADO error对象。错误对象表示来自提供程序的单个错误,并且不是特定于ADO的。在发生后续错误时,将清除错误集合中的所有错误对象,并为当前错误插入新的错误对象。
  • 注意:使用Errors直接访问底层ADO Errors集合对象需要对ADO对象和ADO Errors集合对象有很好的了解。除非您熟悉连接对象操作,否则不建议直接使用Errors集合对象。有关使用ADO错误集合对象的特定信息,请参阅Microsoft Data Store SDK帮助。

  

Error = ADOInt.Error;
  Error = interface(IDispatch)
    function Get_Number: Integer; safecall;
    function Get_Source: WideString; safecall;
    function Get_Description: WideString; safecall;
    function Get_HelpFile: WideString; safecall;
    function Get_HelpContext: Integer; safecall;
    function Get_SQLState: WideString; safecall;
    function Get_NativeError: Integer; safecall;
    property Number: Integer read Get_Number;
    property Source: WideString read Get_Source;
    property Description: WideString read Get_Description;
    property HelpFile: WideString read Get_HelpFile;
    property HelpContext: Integer read Get_HelpContext;
    property SQLState: WideString read Get_SQLState;
    property NativeError: Integer read Get_NativeError;
  end;
  

Errors = ADOInt.Errors;
Errors = interface(_Collection)
    function Get_Item(Index: OleVariant): Error; safecall;
    procedure Clear; safecall;
    property Item[Index: OleVariant]: Error read Get_Item; default;
  end;

  

  

 

 

 

创建时间:2021.02.06  更新时间:

posted on 2021-02-06 09:26  滔Roy  阅读(228)  评论(0编辑  收藏  举报

导航