⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ulgb.pas

📁 在公司做的一个小的系统源代码
💻 PAS
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -