another beginning SQL/Rev question

James Spencer jspencer78 at mac.com
Sun Oct 9 15:24:35 EDT 2005


On Oct 9, 2005, at 1:26 PM, Charles Hartman wrote:

> Something I don't understand about the revExecuteSQL command. I  
> open my MySQL database and get an id. Now, to make later steps more  
> general purposes, I'd like to ask the database for the structure of  
> one of its tables (number of columns, column names) rather than  
> hardwiring that into the Rev front-end. So I should be able to  
> create a
>     global myArray
> and then with my dbID in hand,
>     revExecuteSQL dbID, "show columns in myTable", "myArray"
> (taking care to put quotes around myArray as the docs say).
>
> Trouble is, nothing shows up in myArray, or anywhere else as far as  
> I can see. Using a variable (or several) instead of myArray doesn't  
> help, neither does putting some dummy stuff ("") into myArray[1],  
> myArray[2], etc., ahead of time.
>
> What am I not understanding?

I'm not sure why this isn't working but then I find proper use of  
revExecuteSQL to be a black art but what may work better in any case  
is to use revDatabase____ (ColumnCount, ColumnNames, etc) rather than  
using revExecuteSQL.

James P. Spencer
Rochester, MN

jspencer78 at mac.com

"Badges??  We don't need no stinkin badges!"




More information about the use-livecode mailing list