ulgb.pas
来自「在公司做的一个小的系统源代码」· PAS 代码 · 共 53 行
PAS
53 行
unit Ulgb;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, DB, ADODB, Grids, DBGrids;
procedure adoqopen(adoq: Tadoquery; str: string);
procedure adoqexcute(adoq: Tadoquery; str: string);
implementation
uses Udm;
procedure adoqopen(adoq: Tadoquery; str: string); //adoquery 带strings的查询
begin
with adoq do
begin
if active then active := false;
DisableControls;
sql.Clear;
sql.Add(str);
try
active := true;
except
Screen.cursor := crDefault;
application.MessageBox(Gcntinfo, Gsysname, mb_ok + MB_ICONINFORMATION);
abort;
end;
EnableControls;
end;
end;
procedure adoqexcute(adoq: Tadoquery; str: string); //adoquery 带strings的查询
begin
with adoq do
begin
if active then active := false;
DisableControls;
sql.Clear;
sql.Add(str);
try
adoq.ExecSQL
except
screen.Cursor := crdefault;
application.MessageBox(Gcntinfo, Gsysname, mb_ok + mb_iconerror);
exit;
end;
EnableControls;
end;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?