Code Samples > RDBMS-Specific Examples > Informix
 
Informix
SQL3 Features
The inf9obj example, built from the files inf9obj.cpp and ildutil.cpp, can only be run against an Informix Universal Server. Thus, the first argument passed to the IldNewDbms inline function is hard-coded.
In this example, a distinct type to be used in a collection and a named row type are created. These types are used to define two tables in which the following objects are inserted:
*A first row using a fully literal statement with an IldObjectType typed parameter,
*Then, other rows using a parameterized insert statement with an IldCollectionType typed parameter.
For the first object parameter insertion, the abstract data type descriptor is retrieved by its name using the function IldDbms::getAbstractType. However, this is not possible for the second insertion because the collection parameter needs an anonymous abstract type descriptor. This descriptor is retrieved via the table column description using the function IldDbms::getRelation. Then, the column abstract data type descriptor is accessed via the IldDescriptor::getADTDescriptor member function.
*Finally, two select statements are issued against the tables and the fetched rows are printed.
Stored Procedure Call
The infproc example is built from the files infproc.cpp and ildutil.cpp. Two procedures are created:
*The first procedure queries the catalog table systables for all table names and identifiers that match its second argument and whose owner is the one passed as its first argument. The matching table names and identifiers are returned as a standard result set that will be fetched.
*The second procedure sends an array of parameter values to be inserted in a temporary table.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.