Assign Primary Key and counter in ProDataset when using Read-XML

Potish

Member
I am processing an XML response from a vendor using a ProDataset.

1. The XML does not have the field we utilize as the primary index on our system. I would like to assign this value to the Prodataset before or after the Read-XML but I have not been successful doing so. How can I assign a value to a field into temp-tables of the Prodataset before or after the Read-XML when the value is not in the XML file?

2. The XML has some nested fields that load into a temp-table during the read-XML that I need to assign a counter to for later business processing. How can I assign a counter to nested temp-tables after or during the Read-XML?
 

Cringer

ProgressTalk.com Moderator
Staff member
Is the primary index a generated key of some kind? How is this handled in the normal application? If the triggers are used, then just exclude the key value from the copy to the database and the triggers will still fire and assign these automatically.
Whatever the case, you can build a query on your prodataset and iterate the records and do whatever you need to. A prodataset is just a collection of temp tables with defined relations.
 
Top