Bde.DBTables.TStoredProc.Prepare
Delphi
procedure Prepare;
C++
void __fastcall Prepare();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Bde.DBTables.pas Bde.DBTables.hpp |
Bde.DBTables | TStoredProc |
Description
Prepares a stored procedure for execution.
Call Prepare to bind a stored procedure's parameters before calling ExecProc to execute the procedure. Prepare readies a stored procedure's parameters, initializes the Borland Database Engine (BDE), and informs the server of the stored procedure's readiness. These steps allocate system resources and optimize the query for server performance.
Note: If an application attempts to execute a stored procedure that has not been prepared, the library automatically prepares the procedure before executing it, and then unprepares it when execution is complete. If a stored procedure will be executed more than once, it is more efficient for an application to call Prepare explicitly once to avoid repeated and unnecessary preparing and unpreparing of the stored procedure, and then call UnPrepare when the stored procedure is no longer needed.