Convert TEMP-TABLE to System.Data.DataTable

Posted by vjug on 14-Jan-2010 03:17

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.

All Replies

Posted by Peter Judge on 14-Jan-2010 08:11

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

Posted by Admin on 14-Jan-2010 09:31

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.

Posted by jquerijero on 25-Jan-2010 10:11

Try this thread. It has the sample code to use XmlDataDocument.

http://communities.progress.com/pcom/message/59559#59559

This thread is closed