Problems with sqldb lazarus / 16-Databases ---------------------------------------------------------------------- calebs · 2011-04-19 14:12 Hello all. I'm doing a program that works with mysql databases. It uses a second form with this elements Code: [Select]Tconexbase = class(TForm)     basededatos: TMySQL50Connection;     basem: TMySQL50Connection;     mquery: TSQLQuery;     transacm: TSQLTransaction;     transac: TSQLTransaction;     bquery: TSQLQuery;                          and i call it from other forms to interact with databases, always open connections, do all i need to do and closing it. Also i have an unit that does other operations on same database. ej: Code: [Select]procedure buscarconfiguracion (campo: string ; var contenido : string ;var resultado : boolean); var   existe : boolean;   basededatos : TMySQL50Connection;   transac: TSQLTransaction;   bquery: TSQLQuery;   serv : tservidor; begin   resultado:=false;   try     contenido:='';     obtenerservidor(serv, existe);     basededatos:=tmysql50connection.Create(nil);     transac:=tsqltransaction.Create(nil);     bquery:=tsqlquery.Create(nil);     basededatos.Transaction:=transac;     basededatos.Connected:=false;     basededatos.KeepConnection:=false;     basededatos.LoginPrompt:=false;     transac.DataBase:=basededatos;     bquery.DataBase:=basededatos;     bquery.Transaction:=transac;     basededatos.hostname:=serv.servidor;     basededatos.databasename:=serv.base;     basededatos.username:=serv.usuario;     basededatos.password:=serv.contras;     bquery.SQL.text:='SELECT '+campo+' FROM configuraciones WHERE idconfig = 1';     bquery.Open;     if not bquery.EOF then begin       contenido:=bquery.FieldByName(campo).AsString;       resultado:=true;     end;     bquery.Close;     bquery.Free;     transac.Free;     basededatos.Free;   except     resultado:=false;     bquery.Close;     bquery.Free;     transac.Free;     basededatos.Free;   end; end;        The problem is that function generally works but lately, it when reaches to transac.free gives me the error "operation cannot be performed on an active transaction" but i don't have any transaction waiting and all are select orders that makes no modifications to tables. Besides, same unit have no problems called from other programs Any ideas? ---------------------------------------------------------------------- Lacak2 · 2011-04-20 04:13 Try put:  transac.Commit; before:  transac.Free;