how can I loop the data from my query.. Help.!

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
snop21
Posts: 90
Joined: Mon Jan 20, 2014 2:54 pm

how can I loop the data from my query.. Help.!

Post by snop21 »

Hello guys,


I just want to ask how can I loop the data from my query? I just want it to display it to the message box instead of displaying into the datagrid.

I attached the file.

Any help will be very much appreciated.

Regards

-snop21
Attachments
QueryMoBilePick.livecode.zip
(1.15 KiB) Downloaded 389 times
splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Contact:

Re: how can I loop the data from my query.. Help.!

Post by splash21 »

Hi, snop21. Just change;

Code: Select all

set the dgText of group "Datagrid 1" to tdisplay
to

Code: Select all

put tdisplay into msg
and the results will show in the message box
LiveCode Development & Training : http://splash21.com
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: how can I loop the data from my query.. Help.!

Post by Klaus »

And that also works nicely on a Mac and Linux 8)
snop21
Posts: 90
Joined: Mon Jan 20, 2014 2:54 pm

Re: how can I loop the data from my query.. Help.!

Post by snop21 »

Hi splash21 and Klaus,


Pardon me... :)) It's not a message box actually that I want to display it. :))

I want to display it with the dialogbox "it's answer here in livecode"

from my query I want to loop to get the record from it and diplsay it to the dialogbox one by one.

repeat ----

answer " " -----> data from my query

end repeat

Don't know how to do it exactly.. :(

Need your help guys..

Regards

-snop21
splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Contact:

Re: how can I loop the data from my query.. Help.!

Post by splash21 »

snop21 wrote:repeat ----
answer " " -----> data from my query
end repeat
You've already got it! :P

Code: Select all

repeat for each line tRow in tDisplay
  answer tRow
end repeat
LiveCode Development & Training : http://splash21.com
Post Reply