unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.DB, Vcl.Grids, Vcl.DBGrids, Vcl.StdCtrls, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Phys.FB, FireDAC.Phys.FBDef, FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf, FireDAC.DApt, FireDAC.VCLUI.Wait, FireDAC.Comp.UI, FireDAC.Comp.DataSet, FireDAC.Comp.Client; type TForm1 = class(TForm) DBGrid1: TDBGrid; DataSource1: TDataSource; Button1: TButton; FDConnection1: TFDConnection; FDTransaction1: TFDTransaction; FDTable1: TFDTable; FDGUIxWaitCursor1: TFDGUIxWaitCursor; FDTable1ID_VARIABLE: TIntegerField; FDTable1ID_COMPLECT: TIntegerField; FDTable1NAME_VARIABLE: TStringField; FDTable1VALUE_VARIABLE: TStringField; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var Current : TBookMarkStr; V : Variant; begin Current := TBookmarkStr(FDTable1.Bookmark); V := Null; FDTable1.Bookmark := TBookmark(Current); end; procedure TForm1.FormCreate(Sender: TObject); begin FDConnection1.Open; FDTable1.Open; end; end. |