Casting from a typed ICE Table to a standard DataTable

You are doing roughly the same thing…

BufferCopy is a high speed copying API to copy between two objects without having to do a custom method to do a:

target.Field1 = source.Field1;

a few billion times for every possible combination of classes. It uses the same engine as two other similar APIs:
DataSetAdapter - Copies to and from a .NET System.Data.DataTable and an Ice.Tableset (Client side in an Impl)
TablesetAdpater - Copies from a SQL Reader into a Ice.Tableset (Server side in the ICE Data Layer from the Get Sprocs)

Example usage in Tip:

DatasetAdapter.CopyTSTableToDataTable<TipRow, TipDataSet.TipDataTable>(tableSet.Tip, dataSet.Tip);

There are a few overloads and we have changed these API sigs a few times so you need to review them on different versions.

3 Likes