|
|
|
|
HQueryExecuted (Function) In french: HRequêteExécutée Determines if a query has been executed. This function can be used before looping through the query results, for example. If you try to loop through the result of a query that has not been executed, a WLanguage error will be displayed. Difference with HDataSourceKnown: HDataSourceKnown determines if the data source is known to the HFSQL engine, regardless of its content. HQueryExecuted can only be used with queries. qryFlightsStat is SQL Query =
[
SELECT * FROM Flights
WHERE Flights.DepartureAirportID = {ParamDepartureAirportID}
AND Flights.ArrivalAirportID = {ParamArrivalAirportID}
]
qryFlightsStat.ParamDepartureAirportID = 12
qryFlightsStat.ParamArrivalAirportID = 2
IF NOT HQueryExecuted(qryFlightsStat) THEN
HExecuteSQLQuery(qryFlightsStat)
END
Syntax
<Result> = HQueryExecuted(<Query to check>)
<Result>: Boolean - True if the query has already been executed,
- False otherwise, or if the <Query to check> parameter is not a query. HErrorInfo returns more details about the problem.
<Query to check>: Character string Name of the query to be checked. This parameter can be: - Name and full path of the query (".WDR" file).
- Query logical name.
- Name of a variable of type SQL query.
If this parameter is not a query name, <Result> will be False. Remarks "INSERT", "DELETE" and "CREATE" queries can only be looped through if they contain the SQL "RETURNING" clause. Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|