E-Zine 45 on the pro's and cons of using Progress datase

Posted by scott_auge on 02-Jan-2017 09:37

The document can be downloaded from here: http://www.amduus.com/cms/?q=node/137

All Replies

Posted by Stefan Drissen on 02-Jan-2017 10:30

Assuming that you really meant to use a valid XML date in your first message and not some American formatted date text, you can use:

define temp-table ttOrderHeaders serialize-name "AsOfDate"
   field AsOfDate as date xml-node-type "text"
   .

define temp-table ttOrders serialize-name "Orders"
   field OrderNo as int
   field CustomerName as char
   .
   
define dataset dsOrderLists serialize-name "OrderList" for ttOrderHeaders, ttOrders.   

define buffer buOrderHeader for ttOrderHeaders.
define buffer buOrder       for ttOrders.

create buOrderHeader.
assign 
   buOrderHeader.AsOfDate = today
   .
   
create buOrder.
assign
   buOrder.OrderNo      = 1
   buOrder.CustomerName = "Stefan Drissen"
   .
create buOrder.
assign
   buOrder.OrderNo      = 2
   buOrder.CustomerName = "Scott Auge"
   .
   
def var lcc as longchar.

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

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

Posted by scott_auge on 02-Jan-2017 22:18

Ah, need trick!  Never knew one could do that.  Do now. :)

This thread is closed