Welcome! Log In Create A New Profile

Advanced

SQL Query

Posted by jtadebruin 
SQL Query
May 29, 2019 09:33AM
Hey

I use the new SQL Query variable

qryFlightsStat is SQL Query =
[
SELECT * FROM Flights
WHERE Flights.DepartureAirportID = {ParamDepartureAirportID}
AND Flights.ArrivalAirportID = {ParamArrivalAirportID}
]
qryFlightsStat.ParamDepartureAirportID = 12
qryFlightsStat.ParamArrivalAirportID = 3
HExecuteQuery(qryFlightsStat)


How do i know the total number of records without using FOR EACH?
Hnbrec(qryFlightsStat) gives an error...


TIA
Jan
Re: SQL Query
May 29, 2019 01:14PM
On Windev 23 / 64bits it works fine.



Edited 1 time(s). Last edit at 05/29/2019 01:15PM by Stefano.
Re: SQL Query
May 29, 2019 08:06PM
Jan,

tested with the parameters

sqData is SQL Query = 
[
 SELECT ORDERS.Brand
 FROM ORDERS
 WHERE ORDERS.ZoneName = 7 
]

HExecuteQuery(sqData,hQueryDefault)

nCnt is int = HNbRec(sqData)

Answer was 3
Re: SQL Query
May 31, 2019 01:58PM
Oke thanks for the replay'sthumbs up



Edited 1 time(s). Last edit at 05/31/2019 01:59PM by jtadebruin@gmail.com.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: