Dynamic TEMP-TABLE Parameter

wesf

New Member
I need to be able to accept ANY temp-table as an input parameter, which means I can't accept a TABLE - it has to be a TABLE-HANDLE or HANDLE. I can use the table in the new window, but the formatting of the temp table seems to have reverted back to the progress defaults. I need to build a dynamic browse based on the structure of the temp table, so this is a problem. I think I've tried every combination of TABLE-HANDLE and HANDLE, but haven't had any luck. Am I missing something or is this not possible?
btw, this is within the same session.
Thanks,
Wes
 

thesfinx

New Member
wesf said:
I need to be able to accept ANY temp-table as an input parameter, which means I can't accept a TABLE - it has to be a TABLE-HANDLE or HANDLE. I can use the table in the new window, but the formatting of the temp table seems to have reverted back to the progress defaults. I need to build a dynamic browse based on the structure of the temp table, so this is a problem. I think I've tried every combination of TABLE-HANDLE and HANDLE, but haven't had any luck. Am I missing something or is this not possible?
btw, this is within the same session.
Thanks,
Wes

Did you try the "rcode-information" with the define temp-table statement? That should do the trick.
 

Mikael Eriksson

New Member
wesf said:
I need to be able to accept ANY temp-table as an input parameter, which means I can't accept a TABLE - it has to be a TABLE-HANDLE or HANDLE. I can use the table in the new window, but the formatting of the temp table seems to have reverted back to the progress defaults. I need to build a dynamic browse based on the structure of the temp table, so this is a problem. I think I've tried every combination of TABLE-HANDLE and HANDLE, but haven't had any luck. Am I missing something or is this not possible?
btw, this is within the same session.
Thanks,
Wes


Hi wesf,
I have done something like that. It was a while since I did it but i think you will have to use the TABLE-HANDE. I found a bit code in one of my files that look like this, hope it will help you a little bit. :up:

/*Code*/

tth = TEMP-TABLE temptable:HANDLE. /* tth can be passed as an argument */

/*This code will use the temptables field to be represented in the browse
one column for each field....*/
brwh = BROWSE_WHATEVER:HANDLE IN FRAME {&FRAME-NAME}.
CREATE QUERY queh.
queh:SET-BUFFERS(tth:DEFAULT-BUFFER-HANDLE).
brwh:QUERY = queh.
brwh:ADD-COLUMNS-FROM (bufh).

/* END Code*/


Good luck!

/Mikael
 
Top