Code: Select all
procedure TFDBView.ToolButton2Click(Sender: TObject);
begin
ZQ.Close;
ZQ.Connection := ZT.Connection;
ZQ.SQL.Text := SQLEdit.Text;
ZQ.Open;
DS.Dataset := ZQ;
end;
procedure TFDBView.ToolButton3Click(Sender: TObject);
var vs : string;
begin
ZQ.Close;
ZQ.SQL.Text := 'select max(fversion) as v, * from phsp_files where fid=:f';
ZQ.Open;
vs := ZQ.FieldByName('v').AsString;
showmessage(vs);
end;