table buffer

Beeb

Member
Can anybody tell me why it is important to use table buffers?
I used to know the technical explanation but i don't remember.

Thanks a lot!

greetz,

Elise
 
Hi Elise,

One use may be passing a table handle to a procedure to perform similar action on a number of temp-tables.
 
hi elise,

table buffer also is very useful when you want to do "find/for each" in the same looping for the "for each".

example:
/*======= error 's statement =========*/
for each tableA.
find first tableA.
end.
/*==============================*/


/*======= Correct 's statement =========*/
define buffer bfTableA for tableA.
for each tableA.
find first bftableA.
end.
/*==============================*/

because while doing for each, and u do another 'find/for each' statement inside the for each, the pointer dont know which row record is for which "for each/find".
 
yeah i know when i can use table buffers.
but when i learned progress in the beginning. I was told to always use a buffer of a table when doing something with that table.
But i don't remember why it was.

Thanks anyway!

Elise
 
What you were probably being told was that, in an internal procedure, if you define a buffer for a database table and then use that buffer name instead of the database name, it is a very easy and obvious way to insure that the buffer is scoped to the internal procedure.
 
Back
Top