How to store the result of a mysql query in a visualneo variable ? - Forum

Forum Navigation
You need to log in to create posts and topics.

How to store the result of a mysql query in a visualneo variable ?

Hello VisualNeo Experts,

First of all congratulations for your amazing RAD Program. I discovered it recently and am, as a newbee programer, totally amazed by its possibilities. 

I use visualdbpro (demo version) for a quizmaker app and wonder if and how it is possible to store the result of a mysql query in a variable. I succeed to display the result in a grid on a rectangle, but can't figure out how to send the contents of one of the fields to a variable.

Here is the code I use so far for the query and the display:

dbpExecSQL "tb5" "SELECT QuestionID, Correct, COUNT(*) FROM Answers| WHERE Correct = True and QuestionID = [tb5.Questions.QuestionID]| GROUP BY QuestionID, Correct;" "Temp1"
dbpFind "tb5" "Temp1" "Correct" "True" "ExactMatch=No;CaseSensitive=No"
dbpShowGrid "tb5" "Temp1" "show_correct"

and here is a screenshot of the result shown in a grid:

I would be so glad know how to fix the issue and/or get a work around advice.

 

Thanks in advance for your support

André Wild (Visual_Oldy)

The contents I need to get in a variable is the value (number 2) right to the selected "Correct" field

the value is in the variable [tb5.temp1.Expre1002]

salu2

Visual_Oldy has reacted to this post.
Visual_Oldy

Thanks so much  You made my day :-) salut2