thank you now .. can´t run a query the error says the dataset is inactive ... it inactive because i can´t open/ active de query
I get the message that the query is closed and get the inactive error on SQLQuery1.First;
procedure TForm1.Button1Click(Sender: TObject);
var
msg: String;
erro :Boolean;
begin
erro:=false;
msg:='ok ';
MySQLConn.Connected:=true;
if MySQLConn.Connected then
SQLTransaction1.Active:=true
else
begin
erro:=true;
msg:='MySQLConn not connected .!';
end;
if erro=false then
begin
if SQLTransaction1.Active then
SQLQuery1.Active:=true
else
begin
erro:=true;
msg:='SQLTransaction1 not active .!';
end;
end;
if erro=false then
begin
if not SQLQuery1.Active then
begin
erro:=true;
msg:='SQLQuery1 not active ...!';
end;
end;
if (erro) then
MessageDlg('Error',msg ,mtError,[mbOK],0);
SQLQuery1.First;
end;