Subject Re: [IBO] Delphi-Ibo spesific question...
Author Salvatore Besso
hello Burak,

> if Trim(PRM_DOVKOD) = glb_DEFCUR then if the
> equality accures qryDOVKUR.Create never runs,
> but the object is on the memory.

I'm not sure to have understood what you want, but it seems that
sometimes you could try to release a non allocated query. What about
moving the Trim test outside the "try-finally" block since in this
case you don't need the query? Moreover, use FreeAndNil to release
your objects:

function
TDataMod.Get_Doviz_Kur(PRM_DOVKOD:String;PRM_TARIH:TDateTime;PRM_TIP:B
yte;PRM_ISN:Integer):Currency;
var qryDOVKUR:TIB_Query;
Msg : PChar;
begin
if Trim(PRM_DOVKOD) = glb_DEFCUR then
begin
Result := 1;
Exit;
end;
try
try
DataMod.CreateQuery(qryDOVKUR,nil,False,True);
DO SMTHING XXXXXXXXXXXXXXXXXXXXXXXXXXxxx
except
Application.MessageBox(MSG,'Dikkat',MB_ICONERROR);
Result := 0;
raise;
end;
finally
DataMod.ReleaseQuery(qryDOVKUR);
end;
end;

procedure TDataMod.CreateQuery(Var
Query:TIB_Query;Transaction:TIB_Transaction;RequestLive,ReadOnly:Boole
an);
begin
Query := TIB_Query.Create(Self);
Query.IB_Connection := DataMod.dbaMain;
if Transaction <> Nil then Query.IB_Transaction := Transaction;
Query.RequestLive := RequestLive;
Query.ReadOnly := ReadOnly;
end;

procedure TDataMod.ReleaseQuery(var Query:TIB_Query);
begin
if Assigned(Query) then
begin
if Query.Active then
Query.Close;
FreeAndNil(Query);
end;
end;

Best regards
Salvatore