Subject Re: [IBO] Re: application using up ram
Author Helen Borrie
At 08:28 AM 5/03/2004 +0000, you wrote:

> > >What happens if I open a cursor, and do not close it before a
>commit ?
> > >Will this affect this ?
> >
> > No, you don't open and close cursors. There is no buffering.
> > You call First on tib_cursor to "open" it and it's "finished" when
>the last
> > row has been fetched.
> >
> > How many rows are you reading? Where are you putting the data?
>Maybe I have missed something.
>I open a cursor like this:

Should be MyCursor.First;

> SomeInsQuery.FIeldByNAme('SomeValue') := MyCursor.FieldByName
> SomeInsQuery.ExecSQL;

Executable SQL should be
insert into aTable (aColumn) values (:SomeValue);

Then, before executing:


>(* MyCursor.Close; *) No.
> Commit;
>Or am I using Cursors the wrong way ?
>My customer types a number on the screen, and when he presses ENTER I
>find the according record with a cursor, like:
>Select VALUES from TABLE Where Number = :PNumber.

That one is OK. It's your executable stuff that isn't right.

>I'm starting to get a problem on one of our Terminal Servers because
>the appl. is using up all RAM as time goes......

Well, the reason isn't obvious yet.