📄 unit13.~pas
字号:
unit Unit13;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBTables;
type
TForm13 = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Edit2: TEdit;
Label4: TLabel;
Edit3: TEdit;
Label5: TLabel;
Edit4: TEdit;
Label6: TLabel;
Edit5: TEdit;
Label7: TLabel;
Edit6: TEdit;
Button1: TButton;
Button2: TButton;
Query1: TQuery;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form13: TForm13;
implementation
{$R *.dfm}
procedure TForm13.Button1Click(Sender: TObject);
begin
with Query1 do
begin
Close;
Sql.Clear;
Sql.Add('insert into book (code,bookname,author,concern,outdate,jg)');
Sql.Add('Values(:code,:bookname,:author,:concern,:outdate,:jg)');
Params.ParamByName('code').asstring:=edit1.Text;
Params.ParamByName('bookname').asstring:=edit1.Text;
Params.ParamByName('author').asstring:=edit1.Text;
Params.ParamByName('concern').asstring:=edit1.Text;
Params.ParamByName('outdate').asstring:=edit1.Text;
Params.ParamByName('jg').asstring:=edit1.Text;
ExecSql;
ShowMessage('成功入库');
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -