Database Pre and Post commands

The ODBC interface allows for pre and post-commands for the database. These commands are defined on the Format tab of Interface Entry window. The pre and post-commands are SQL statements. You can define pre-SQL and post-SQL expressions when using ODBC toolkit. These expressions are SQL commands that are sent to and executed by the database server on the external system before and after the execution of the interface. These commands are present in the SQL variant of the server. Infor Production Scheduling does not consider the return values or output parameters. A typical use of the pre-SQL expression by an import interface is the creation of a view from which to import data, (for example, CREATE VIEW Production Scheduling Order AS SELECT Code, EndItem, Quantity, DueDate FROM YourOrder). Another use is calling a stored procedure on your server that creates the data to be imported by the interface. An export interface might use the pre-SQL expression to delete rows (for example, DELETE FROM YourOrder WHERE Status = Completed). A post-SQL expression could call a stored procedure to process the exported data further.

Every line (except begin) in the pre/post-command field must be closed with a semicolon (;). If the line is not closed properly, the pre/post command cannot be executed. For example, delete AS_Orders must be delete AS_Orders;. Infor Production Scheduling does not generate a warning if a pre/post-command cannot be parsed.