Serialize-name For Dynamic Temp-table

greeshma

Member
Hi,
Code:
 /* Add field to temp table */
                ASSIGN
                    run-ok = hTT-data:ADD-NEW-FIELD(hField:NAME,
                                                   hField:DATA-TYPE,
                                                   hField:EXTENT,
                                                   IF querycol.q-format = "NOTE"
                                                   THEN "x(8)"
                                                   ELSE v-format,
                                                   hField:INITIAL,
                                                   hField:LABEL).
hTT-data is temp-table handle . I am trying to add fields from different tables. How we can add serialize-name for this field?
 

Stefan

Well-Known Member
Unfortunately you seem to only be able to add the serialize-name after the temp-table has been prepared. So you will need to collect the field names and serialize names and apply them after preparing the temp-table.
 

greeshma

Member
Unfortunately you seem to only be able to add the serialize-name after the temp-table has been prepared. So you will need to collect the field names and serialize names and apply them after preparing the temp-table.
Thank you Stefan,
I can collect the field and its serialize name. But i couldn't find a syntax to add serialize name like that. Can you please help me.
 

Stefan

Well-Known Member
Code:
def var ht as handle no-undo.
def var hb as handle no-undo.

create temp-table ht.
ht:add-new-field( "whatever", "character" ).
ht:temp-table-prepare( "boo" ).

hb = ht:default-buffer-handle.

hb:buffer-field( "whatever" ):serialize-name = "serialized".


hb:buffer-create().
hb::whatever = "something".

def var lcc as longchar.

hb:write-xml( "longchar", lcc, true ).

message string( lcc ) view-as alert-box.
 
Top