dmrsgl.pas

来自「人事管理系统: 部门管理(添加、删除、修改) 员工信息管理(员工信息添加、删」· PAS 代码 · 共 46 行

PAS
46
字号
unit dmRsgl;

interface

uses
  SysUtils, Classes, RSGLCommon, ADODB, DB, Dialogs;

type
  TdmRsgl = class(TDataModule)
    adocRsgl: TADOConnection;
    adotRyxx: TADOTable;
    adotBmxx: TADOTable;
    adotJycd: TADOTable;
    procedure DataModuleCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

implementation

{$R *.dfm}

{ TdmRSGL }

procedure TdmRsgl.DataModuleCreate(Sender: TObject);
var
  l_File: string;
begin
  inherited;

  l_File := DataPath + conRSGLDataFile;
  if not FileExists(l_File) then
    ShowMessage('文件不存在!无法打开数据库!');

  with adocRsgl do
  begin
    ConnectionString := CNT_ConnectString;
    ConnectionString := Format(ConnectionString, [l_File]);
    Connected := True;
  end;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?