PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → SQLExec error
SQLExec error
Débuté par Phil Johnson, 28 déc. 2009 22:15 - 1 réponse
Posté le 28 décembre 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....
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 29 août 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/