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: FourthWorld, heatherlaine, Klaus, 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 » Thu Feb 20, 2014 10:39 am

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 251 times

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

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

Post by splash21 » Thu Feb 20, 2014 10:57 am

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: 13878
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Thu Feb 20, 2014 12:54 pm

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 » Fri Feb 21, 2014 2:35 am

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
Location: UK
Contact:

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

Post by splash21 » Mon Feb 24, 2014 6:15 pm

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

Return to “Windows”