Bhavin Bhaskaran
Bhavin Bhaskaran

Reputation: 582

Creating dynamic temp table from dynamic Buffer

Here is my issue:

CREATE QUERY hQuery.
    hQuery:SET-BUFFERS(hBuffer).
    hQuery:QUERY-PREPARE("/*my conditions*/").
    hQuery:QUERY-OPEN().

hBuffer is my buffer handle.

I want to create a temp-table from this hBuffer.How?Pls help

Upvotes: 0

Views: 3425

Answers (1)

ade jones
ade jones

Reputation: 669

See "CREATE TEMP-TABLE statement" in on-line help. An example is shown and i believe you can just replace the static table buffers with your dynamic buffer handle....

CREATE TEMP-TABLE tth.
tth:CREATE-LIKE(hBuffer).
tth:TEMP-TABLE-PREPARE("MyTT").
ttbh = tth:DEFAULT-BUFFER-HANDLE.

/* populate */
ttbh:BUFFER-CREATE.
ttbh:BUFFER-COPY(hBuffer).

Upvotes: 1

Related Questions