How to create a record of a table dynamically?

mallikasp

New Member
Hi Friends,

How do we add a record in a table dynamically, where the table name is entered at run time. If somebody has the answer kindly help me.

Regrads
Mallika
 

parul

Member
Have a look at buffer-create method.

Def var wkhandle as handle no-undo.
def var wktable as char no-undo.

/*create buffer for table - provided at runtime*/
create buffer wkhandle for table(wktable).

do transaction:
/*create record*/
wkhandle:buffer-create().

/* assign value to a field*/
wkhandle:buffer-field('field name'):buffer-value = run time value.
end.


-Parul.
 
Top