ODBCOutput executes an SQL update query against an open ODBC data source. You should use the ODBCOpen function to open the data source before calling ODBCOutput, and use ODBCClose to close the data source before exiting the process.

This function is valid in TurboIntegrator processes only.


ODBCOutput(Source, SQLQuery, [SQLQuery2, SQLQuery3, ...]);




The ODBC data source against which you want to run a query.


An SQL query statement.

Though ODBCOutput was developed to update tables, it can be used to execute any SQL query on the data source.

In circumstances where the SQL query statement exceeds 255 characters, you should split the query into multiple SQLQuery arguments (SQLQuery2, SQLQuery3, etc.). This lets you create query statements that exceed the 255 character limit for TurboIntegrator arguments. When the ODBCOutput function is executed, all SQLQuery arguments are concatenated and the query is successfully executed.


ODBCOutput('Accounting', 'INSERT [CategoryID], [CategoryName]FROM Categories;');

This example executes the specified query against the Accounting data source.