|
This technical article features a video showing how to create a strongly-typed .NET OO c# DataSet object based on a Db2 for i Table (DDS or DDL Physical File or external data structure), using the OLE DB Provider from IBM (distributed in the IBM ACS Windows Appication Package). The end result is an equivalent set of data elements, when compared to what IBM i developers do when they want to create an external data structure (EDS or *FILE object type with PF attribute) based on a subset of a record format for use in their programming.
The DataSet object type that comes with the .NET Framework is sort of like an IBM i multi-occurence external data structure on steroids, as
the .NET DataSet also contains methods (routines) that can be used by the developer to populate and manipulate the data contained inside the DataSet at run time. The main thing you can't accomplish with the .NET DataSet however, is that you can't overlay namespaces.
This TechCrystal Article contains a link enabling you to stream a How-To video directly from our site (with no obligation or preference-style cookies for that matter). There is also a c# code example PDF showing
how to generate the XML string and how to use database column names in compiled code, which
is something several native IBM i languages enable by definition, but is something that is not normally available (at compile time at least) for SQL-accessed database column names in c# or VB.NET (unless you use OO programing with this type of DataSet). It is speculated that languages like c# and VB.NET don't consider this a priority and also they promote a style of programming with a more strict separation of the data layer and/or UI layer from the application layer and also have to focus on offering SQL style connectivity to multiple vendors (each of whom develop their own adapter).
There is also available for free download, with website registration, Ch 8 Drag and Drop PF DS to OO DataSet from the Pro Into Module of our Get Running - Tegratecs Code Package™.
|