PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → SQLExec error
SQLExec error
Iniciado por pbj1, 28,dic. 2009 22:15 - 1 respuesta
Publicado el 28,diciembre 2009 - 22:15
I have a Windev project (My First) that I am trying to get the code behind a button to display info from a SQL query. My project has an analysis attached to a Microsoft Access database. There is a table named Dealers that I wish to open and loop through in the code. Here is what I have so far:

i is int = 0
LocationID is string
SQLText is string

SQLText = "SELECT LocationID From Dealers"
IF NOT SQLExec(SQLText,"QRYTest") THEN Error("Error")
// Retrieve the query line by line
WHILE SQLFetch("QRYTest") = 0
// There is still another line to read
i++
// Retrieve the data
LocationID = SQLGetCol("QRYTest", 1)
Info(LocationID)
END
SQLClose("QRYTest")


When I execute this code I get an error that says "No Current Connection" which seems to imply that I need to create a connection to the Analysis somewhere in the code. The help examples seem to imply that as long as the the table is in the Analysis attached to the project, the connection is implied.

Can anyone help me out with this?

Thanks....
Miembro registrado
4.618 mensajes
Publicado el 29,agosto 2018 - 19:18
Hi,

I opened a call at PCSOFT and I got this message too.

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/