數據庫表映射Delphi類的一個小程序

實現數據庫自動映射Delphi類

生成添,刪, 改,查,方法

支持數據庫直接導入

例子:

{@Powered By:Table2Class @Author:xwk @Date:2006-12-18 11:47:26}

 

unit TBoard_eZ32;

 

interface

 

uses

    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

    ADODB, DB, Contnrs;

 

type

 

  {TTBoard_eZ32}

 

    TTBoard_eZ32 = class(TObject)

    private

        FConnection: TADOConnection;

        FId: Integer;

        FBoardId: Integer;

        FSendInitDynamicMsg: string;

        FParamByDefault: string;

        FProtocoltypeforCLIP: string;

    public

        property Connection: TADOConnection read FConnection write FConnection;

        property Id: Integer read FId write FId;

        property BoardId: Integer read FBoardId write FBoardId;

        property SendInitDynamicMsg: string read FSendInitDynamicMsg write FSendInitDynamicMsg;

        property ParamByDefault: string read FParamByDefault write FParamByDefault;

        property ProtocoltypeforCLIP: string read FProtocoltypeforCLIP write FProtocoltypeforCLIP;

        function Get(Condition: string = ''): Boolean;

        procedure Add;

        procedure Update(Condition: string = '');

        procedure Delete(Condition: string = '');

        constructor Create;

        destructor Destroy; override;

        procedure Clone(Obj: TTBoard_eZ32; CreateIt: Boolean = False);

    end;

 

  ............

end.

生成的代碼採用了網上一個類似的軟件的風格,覺得他寫的挺好所以我就不自己寫了

下載

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章