【delphi开源代码栏目提醒】:网学会员,鉴于大家对delphi开源代码十分关注,论文会员在此为大家搜集整理了“dmKqgl.pas”一文,供大家参考学习!
unit dmKqgl;
interface
uses
SysUtils, Classes, DB, Dialogs, DBTables, KqglCommon, FMTBcd, SqlExpr;
type
TdmKqgl = class(TDataModule)
dbKQGL: TDatabase;
tblYgxx: TTable;
qryCommon: TQuery;
qryKqjl: TQuery;
qryKqtj: TQuery;
private
{ Private declarations }
public
{ Public declarations }
constructor Create(AOwner: TComponent); reintroduce;
end;
implementation
{$R *.dfm}
constructor TdmKqgl.Create(AOwner: TComponent);
var
l_File: string;
begin
inherited;
l_File := EXEPath + conKqglDataFile;
if not FileExists(l_File) then
begin
ShowMessage('文件不存在!无法打开数据库!');
Exit;
end;
if Create_ODBC_Access('KQGL') then
begin
with dbKqgl do
begin
AliasName := 'KQGL';
dbKQGL.Open;
end;
tblYgxx.Open;
end
else begin
ShowMessage('建立ODBC失败!!');
Exit;
end;
end;
end.
上一篇:
dmGdzc.pas
下一篇:
初中团支部学期工作总结