Board index » delphi » Problems wirh TQuery: Insuficient Memory

Problems wirh TQuery: Insuficient Memory

I'm using Delphi 6 (with Update 2)
I'm having problems with TQuery when opening, I have a procedure that
I need to run several times (one after another), in that procedure I
have some TQueries that I need to run. The procedure runs okay, but
after 13 times it gives error (Insuficient Memory For this Operation)
when opening the query.

I allways Close all queries when I don't need them anymore, and I have
in all the TQueries the UniDirectional property set to True.

Can anyone help with this???

Thank you very much in advance for all help you could provide.

 

Re:Problems wirh TQuery: Insuficient Memory


Hi Mario

Are you using Explicit TDatabase Transactions ?
Are you Commiting the Transaction ?

If don't, try to use it and see if it helps!

HTH
Antonio

Re:Problems wirh TQuery: Insuficient Memory


What database are you using?

--
Bill
(TeamB cannot answer questions received via email)

Re:Problems wirh TQuery: Insuficient Memory


Paradox.

On Thu, 28 Feb 2002 08:36:01 -0700, "Bill Todd \(TeamB\)"

Quote
<bill_nos...@dbginc.com> wrote:
>What database are you using?

>--
>Bill
>(TeamB cannot answer questions received via email)

Re:Problems wirh TQuery: Insuficient Memory


Try preparing the query before each execution and unpreparing it after each
execution.

--
Bill
(TeamB cannot answer questions received via email)

Re:Problems wirh TQuery: Insuficient Memory


We use to have exactly the same problem with a long running update
process that executed query after query after query.

What we found was that the BDE database data cache (MINBUFSIZE in BDE
Admin) would eventually fill up and the error message would appear.
Just increasing this setting in the BDE Admin would just delay the
error message from appearing a little longer.

The only way we found to solve the problem was to programically close
the active "Session". All that was required was to add the lines:

Session.Active := false;
Session.Active := true;

At the end of each update cycle and the problem went away.

Dennis Passmore
Ultimate Software, Inc

Re:Problems wirh TQuery: Insuficient Memory


Thanks!!!!
But I'm not using TSession in my program.
What should I do?

On Thu, 28 Feb 2002 19:36:12 GMT, dennis_passmore@nospam_yahoo.com

Quote
(Dennis Passmore) wrote:
>We use to have exactly the same problem with a long running update
>process that executed query after query after query.

>What we found was that the BDE database data cache (MINBUFSIZE in BDE
>Admin) would eventually fill up and the error message would appear.
>Just increasing this setting in the BDE Admin would just delay the
>error message from appearing a little longer.

>The only way we found to solve the problem was to programically close
>the active "Session". All that was required was to add the lines:

>Session.Active := false;
>Session.Active := true;

>At the end of each update cycle and the problem went away.

>Dennis Passmore
>Ultimate Software, Inc

Re:Problems wirh TQuery: Insuficient Memory


There is a TSession component named Session that is created for you
automatically.

--
Bill
(TeamB cannot answer questions received via email)

Re:Problems wirh TQuery: Insuficient Memory


Thank you! I realized that sometime latter.

Now is working fine, closing and opening session worked perfectly!!!

On Fri, 1 Mar 2002 09:03:54 -0700, "Bill Todd \(TeamB\)"

Quote
<bill_nos...@dbginc.com> wrote:
>There is a TSession component named Session that is created for you
>automatically.

>--
>Bill
>(TeamB cannot answer questions received via email)

Other Threads