What is the best way to get an exact copy of TEMP-TABLE in new object of the System.Data.DataTable type? I would like to use TEMP-TABLE with a .NET control and I already have prepared TEMP-TABLE. Funcionality I need is something like passing TEMP-TABLE (or dataset) between Progress and .NET via OpenClient, but in ABL form.
What is the best way to get an exact copy of TEMP-TABLE in new object of the
System.Data.DataTable type? I would like to use TEMP-TABLE with a .NET
control and I already have prepared TEMP-TABLE.
Have you looked into the ProBindingSource?
There are certainly ways of doing what you want, but they will require you (in ABL code) to make your own deep copy: looping through the rows in the temp-table and creating DataTable rows yourself.
Now that I think about it, there's an example of this in the samples on the 10.2A+ doc CD (start looking in the DataServices.CustOrderService class, in the src\samples\GuiForDotNet\UltraControls folder). But if the PBS is at all an option, I strongly recommend using that.
-- peter
For quick and dirty coding, writing the temp-table and it's xsd to a LONGCHAR and reading those using the appropriate methods of the DataTable works as well.
But I'd strongly recommend the ProBindingSource.
Try this thread. It has the sample code to use XmlDataDocument.