Does anyone have a good solution to copying ProDataset to .N

Posted by jquerijero on 28-Jun-2019 18:53

Copying row by row seems a little slow, has anyone tried doing something similar?

All Replies

Posted by Peter Judge on 28-Jun-2019 19:48

I have not, but would export/import via XML be an option?
 

Posted by dbeavon on 29-Jun-2019 01:57

XML could work.  Or JSON too, which seems to be about 3x faster when I tested last.  I'm assuming you are talking about using the CLR bridge?  And you probably prefer doing it in memory rather than sending data to the file system and back?

You may want to check out Tom Bergman's presentation at pugchallenge.org/downloads2017.html

It is titled  ".Net, Not Gui For .Net ".

As I recall, it had some of the best examples I had found for moving datasets between ABL and ADO.Net.  I think he used JSON, MEMPTR, and LONGCHAR.  It is pretty fast, especially if you are serializing from the Progress side and deserializing on the .Net side.  The other way around is not terrible either.

On the .Net side there will be a dependency on Newtonsoft.

Posted by jquerijero on 26-Sep-2019 22:22

XML might be a valid solution. Using LONGCHAR and MemoryStream seem to be 5X faster than row by row creation.

This thread is closed