Help / WLanguage / Managing databases / HFSQL / HFSQL functions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
<Source>.PrepareQuery (Function)
In french: <Source>.PrépareRequête
HFSQL ClassicHFSQL Client/ServerNot available with these kinds of connection
Initializes a query and declares this query to the database server in order to optimize the next executions of this query. This query is not run. Then, the query can be run by <Source>.ExecuteQuery. This function is available for queries with or without bind.
To free the resources of this query, use <Source>.CancelDeclaration.
We recommend that you use this function when the same query is run successively and when only some of the query parameters are modified at each execution.
This function is optional and it can only be used on the Client/Server databases (currently available for AS/400).
For the other databases accessed by a Native Connector, OLE DB or ODBC, <Source>.PrepareSQLQuery runs the query.
This function cannot be used on the HFSQL databases (HFSQL Classic or Client/Server) and on the xBase databases.
QRY_MyQry.PrepareQuery(MyConnection, hQueryWithoutCorrection)
FOR I = 1 TO 10
QRY_MyQry.lastname = "LastName" + I
QRY_MyQry.firstname = "FirstName" + I
QRY_MyQry.age_ = I
<Result> = <Source>.PrepareQuery(<Connection> [, <Mode>])
<Result>: Boolean
  • True if the query was initialized,
  • False otherwise. HErrorInfo returns more details about the problem.
<Source>: Type corresponding to the specified source
Logical name of the query to be initialized. If a query with the same name is already declared, it is replaced by the new query.
<Connection>: Character string
Connection through which the query will be run. This connection corresponds to:
<Mode>: Optional Integer constant
Option for initializing the query:
Native Connectors (Native Accesses) No check is performed by the HFSQL engine. This option must be used if the query contains commands specific to a connection type (Oracle, SQL Server, etc.).
Caution: if this constant is used:
Component: wd290hf.dll
Minimum version required
  • Version 25
This page is also available for…
Click [Add] to post a comment

Last update: 07/06/2023

Send a report | Local help