602SQL Documentation Index  

SQL Statements - Preparing and Executing

The 602SQL database client may execute SQL statements in two different ways:

The direct method is the easiest for the client. A call to a single function invokes a complete process of an SQL statement.

The prepared SQL statement is mainly used to save time. If the same statement (eventually with different parameter values) is executed repeatedly, the SQL server completely analyzes the statement during the preparation and designs an optimized plan for execution. Each consecutive call to the SQL_exec_prepared function will execute the optimized plan. The SQL_drop deletes the plan that is no longer needed.

The client may have multiple prepared statements and may execute them in any order.

If you call the Set_application function, all previously prepared statements will be dropped and their handles will be invalid.