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(*)
,
odbc1connection base
,
string con
,
array statement
,
string parameters
)
name
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
base | None | type(*) | Gives a base which supports the creation of new tables using the interface which is common to types which are tagged as db1table. |
con | .nul | odbc1connection | Specifies the ODBC connection to be used for executing the provided statement. |
statement | .nul | string | 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 | .nul | array |
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 | .nul | string | The name of the new table to create. |