unit9.pas

来自「基于ACESS数据库的小型进销存管理软件。」· PAS 代码 · 共 42 行

PAS
42
字号
unit Unit9;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, DB, ADODB;

type
  TForm9 = class(TForm)
    Label1: TLabel;
    Edit1: TEdit;
    Button1: TButton;
    ADOTable1: TADOTable;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form9: TForm9;

implementation

{$R *.dfm}

procedure TForm9.Button1Click(Sender: TObject);
begin
adotable1.Active:=true;
with adotable1 do
begin
append;
adotable1.FieldByName('lb').asstring:=edit1.text;
post;
showmessage('添加数据成功!');
end;
end;

end.

⌨️ 快捷键说明

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