Call the Prepare method to have DBISAM allocate resources for the execution of an SQL statement, parse the SQL statement, and perform the process of setting up the SQL statement for execution by opening up source tables, etc. The SQL statement is specified via the SQL property.
DBISAM automatically prepares an SQL statement if it is executed without first being prepared. After execution, DBISAM unprepares the SQL statement. When an SQL statement will be executed a number of times, an application should always explicitly prepare the SQL statement using the Prepare method to avoid multiple and unnecessary prepares and unprepares.
Preparing a query consumes some database resources, so it is good practice for an application to unprepare a query once it is done using it. The UnPrepare method unprepares a query.
When you change the SQL property, the current SQL statement is automatically closed and unprepared.