SIMPOL Documentation

odbc2_buildtablefromodbc()

Description

Creates a new table, of a db1table tagged type, based on an ODBC statement, and fills it with the output data from that statement. If the return value is not .nul then the function has failed and the string contains information describing the error. After the new table is created and has data added to it, there is no attempt to commit the base object; that is the responsibility of the caller.

Prototype

odbc2_buildtablefromodbc ( type(*) base, odbc1connection con, string statement, array parameters, string name )

Parameters

ParameterDefault valueType nameDescription
baseNonetype(*) Gives a base which supports the creation of new tables using the interface which is common to types which are tagged as db1table.
con.nulodbc1connection Specifies the ODBC connection to be used for executing the provided statement.
statement.nulstring The ODBC SQL statement whose output columns will be used to define the fields of the new table to be created. The output of this statement is the data used to add new records to the new table.
parameters.nularray The parameters, if any, to be passed to ODBC when the statement is executed. If parameters is provided then the parameter values must be stored in consecutive elements starting with parameters[1].
name.nulstring The name of the new table to create.