Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Colin M McGrath wrote in message <71kujj$4o5$1@news.xmission.com>...
>
>David Williams wrote:
>
>> I belive under 4gl 6.x (and hence probably D4GL) you need to free the
>> cursor as well..
>
>Tried that, still same error -404.
>Plus, given the version we have (see list below), should we be freeing
both?
>Isn't freeing memory twice asking for eventual core dumps?
>
The problem is linked with the database version and not with the pcode
version.
With version 5.xx databases only free prepared_cursor (or free prepared
statement) can be done.
If both are done, the database returns error -404.
With version 7.xx databases do free prepared_cursor AND free
prepared_statement.
If both free's aren't done, the server eventually gives an out of memory
error.
In 5.xx the free releases both the cursor and the statement.
I think that in 7.xx you can do this (never tried it as our code has to be
5.xx and 7.xx compatible):
prepare statement from string
while ...
declare stat_cursor cursor for statement
foreach row in stat_cursor
...
end foreach
free stat_cursor
end while
free statement
with this code the database only evaluates the plan for the statement once.
In our NewEra program's that work agains't both 5.xx and 7.xx databases we
have
free stat_cursor
if db_version() not like "5%" then
free statement
end if
showing that the problem must be within the database and not in the
4gl(d4gl) pcode interpreter.
Carlos Costa e Silva.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.