This is my code:
Code: Select all
procedure TForm1.Button2Click(Sender: TObject);
begin
ZConnection1.User:='sysdba';
ZConnection1.Password:='masterkey';
if not ZConnection1.Connected then
begin
ZConnection1.Database := 'db1.fdb';
ZConnection1.Connect;
if ZConnection1.Connected then showmessage('Connesso');
end;
ZQuery1.Connection:=ZConnection1;
try
ZQuery1.SQL.Clear;
ZQuery1.SQL.Add(edit2.text);
ZQuery1.ExecSQL;
except
on E : EZSQLException do
begin
// zconnection1.Rollback;
ShowMessage('ErrorCode : ' + IntToStr(EZSQLException(E).ErrorCode)+' '+EZSQLException(E).StatusCode );
end;
end;
ZQuery1.SQL.Clear;
end;
Can somebody help me ?
Thank you