jackads wrote:
put revDataFromQuery(,,gConnectionID,gQuery) into qResult
So, is hard to separate into differents variables, may would have a simple way to recover the query data into an array, so I could do something like this:
By default revDataFromQuery use TAB to separate columns, and CR to separate row.
So in your case, you just have to :
Code: Select all
set itemdelimiter to tab
put item 1 of line 1 of qResult into theID
put item 2 of line 1 of qResult into theEmail
etc.
But you can use other separators, like :
Code: Select all
put revDataFromQuery(TAB,"|",gConnectionID,gQuery) into qResult
In this case, each row will be separated by "|"
Here you can use :
Code: Select all
set linedelimiter to "|"
set itemdelimiter to tab
put item 1 of line 1 of qResult into theID
put item 2 of line 1 of qResult into theEmail
This last trick can be valuable if one of your column contains text with CR for instance. So LiveCode won't cut the result, thinking it's another row.
After you can do :
Code: Select all
put item 2 of line 1 of qResult into theLongText
replace "|" with CR in theLongText
put theLongText in fld "myText"