unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Db, ADODB, StdCtrls, Grids, DBGrids;
type
TForm1 = class(TForm)
ADOConnection1: TADOConnection;
DBGrid1: TDBGrid;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
DataSource1: TDataSource;
ADOTable1: TADOTable;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ADOTable1.Insert;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ADOTable1.Next;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
ADOTable1.Delete;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
ADOTable1.Post;
end;
end.