SQL Yoga Query

Trevor DeVore lists at mangomultimedia.com
Mon Aug 24 09:25:00 CDT 2009

On Aug 24, 2009, at 10:17 AM, Josep wrote:

> I'm try to retrieve all the records from a table named "products"

Hi Josep,

Going forward you may want to post SQL yoga related questions in the  
forums I've set up for it:


> And from a button I try to populate the datagrid
>   put sqlquery_create("product") into theQueryA
>   sqlquery_set theQueryA, "order by", "model"
>   sqlquery_retrieveAsArray theQueryA, theRegionDataA
>   put the result into theError
>   if theError is empty then
>      ## Array can be assigned directly to a data grid
>      set the dgData of group "dg_test" of me to theRegionDataA
>   else
>      answer "Error populating regions:" && theError
>   end if
> But nothing happen or the protected stack appear...
> What I'm doing wrong?

What do you see in the message box if you add this to the handler:

## print out MD array with first line of each key value.
put printkeys(theRegionDataA)

Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Developer Resources: http://revolution.bluemangolearning.com

More information about the use-livecode mailing list