ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV, WEBDEV and WINDEV Mobile 2024 feature!
Help / WLanguage / Managing databases / HFSQL / HFSQL functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
Example
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
Component: wd290hf.dll
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/11/2024

Send a report | Local help