Memory Overrun Leak executing a Stored Procedure
Posted: Fri 04 Dec 2009 06:07
EurekaLog raise the "Overrun Memory Leak" when I free a TUniStoredProc object.
I use Firebird and the example it's very easy:
orSP := TUniStoredProc.Create(Self);
orSP.StoredProcName := 'SP_GET_NEWOID';
orSP.Connection := DataModuleMain.UniConnectionProf;
orSP.PrepareSQL(False);
orSP.ParamByName('SIGLATABELLA').AsString := 'SQLR';
orSP.Execute;
ShowMessage(orSP.ParamByName('NEW_OID').AsString);
orSP.Close;
FreeAndNil(orSP);
The result of the Stored Procedure is ok but the FreeAndNill cause the problem.
I use Firebird and the example it's very easy:
orSP := TUniStoredProc.Create(Self);
orSP.StoredProcName := 'SP_GET_NEWOID';
orSP.Connection := DataModuleMain.UniConnectionProf;
orSP.PrepareSQL(False);
orSP.ParamByName('SIGLATABELLA').AsString := 'SQLR';
orSP.Execute;
ShowMessage(orSP.ParamByName('NEW_OID').AsString);
orSP.Close;
FreeAndNil(orSP);
The result of the Stored Procedure is ok but the FreeAndNill cause the problem.