SIMPOL Documentation



Creates a table on the specified ODBC connection which has a structure matching that of the supplied table or fields, and fills it with data from the table, if supplied. If the return value is not .nul then the function has failed and the string contains information describing the error. If the table is successfully created and an error occurs while transfering data then the target table will not necessarily be dropped, and is likely to contain the data which was successfully transferred before the error was raised.


odbc2_buildodbctable ( odbc1connection con, type(db1table) table, string name, array fields, function filter, type(*) filterref )


ParameterDefault valueType nameDescription
conNoneodbc1connection Specifies the ODBC connection on which the new table will be built.
table.nultype(db1table) Gives an object representing a table which will be used to provide information for the new ODBC table. If table is not supplied, or is .nul, then name and fields must be supplied, and no data will be put into the new table
name.nulstring Gives the name of the new table to be built. If no name is supplied then the name of table is used.
fields.nularray Gives a number of fields which are to define the columns of the new table. If fields is not supplied then the fields of table are used. If fields is supplied then fields[] must contain the number of fields being supplied, and a consecutive sequence of elements of fields, starting at fields[1], must contain references to the fields to use. Each of these fields must belong to table.
filter.nulfunction A function which is used to filter record which may be used to create records in the new table. If supplied filter must take a record as its first argument, and filterref as its second parameter, if filterref is supplied and not .nul. The return value of filter must be a boolean which is .true for records which are to be put into the new table, and .false if not.
filterref.nultype(*) A reference to any object which will be passed to the filter function filter function, if supplied, for each record which may be put into the new table.