PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD22]Queries not searching
[WD22]Queries not searching
Iniciado por guest, 29,ene. 2018 23:08 - 2 respuestas
Publicado el 29,enero 2018 - 23:08
I'm having problems with my queries, I changed a complete project from Client server to Classic, changed my analysis connection to classic and associated my files with this connection, now the queries doesn't work, if I do a HreadSeekFirst or a FOR EACH to a table it works, but queries won't return a thing, here is how I call my query:

QRY_SEL_LOGIN.pUSU_CLAVE = sUsuario
HExecuteQuery(QRY_SEL_LOGIN,hQueryDefault)

also this query throws this error:

The data source is not initialized.
- If it is a data file, the file was not found in the analysis or it was not described by HDeclare/HDeclareExternal.
- If it is a query or a view, the execution may have failed.
To retrieve the corresponding error, check the result of HExecuteQuery/HExecuteSQLQuery/HCreateView.
Publicado el 29,enero 2018 - 23:28
Hi Luis,

>>>also this query throws this error:...

Nope... That's the error happening during the first data access on the result of the query...

So what you need to do is follow the instructions given in the error message:
To retrieve the corresponding error, check the result of HExecuteQuery/HExecuteSQLQuery/HCreateView.



End then you'll know why the query fails.

Best regards
Publicado el 01,febrero 2018 - 16:18
Hi Fabrice I solved it, I don't know why this syntax works on web but not on desktop, sometimes when we do a Query that will only return one record after HExecuteQuery, we just assign the values of the Query to a variable without doing a FOR EACH to the Query or a HReadFirst, just added the FOR EACH after the execution of the Query and worked. Thanks!