another beginning SQL/Rev question
charles.hartman at conncoll.edu
Sun Oct 9 15:07:32 CDT 2005
On Oct 9, 2005, at 2: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,
> myArray, etc., ahead of time.
> What am I not understanding?
> Charles Hartman
I also notice that if I run that revExecuteSQL command (with no
apparent result) and then put something like "select firstnames,
lastname from person" into tQuery and try to run revQueryDatabase
using that, I get a "commands out of sync" execution error. If I
comment out the earlier revExecuteSQL, then the later
revQueryDatabase works fine. What's going on there??
More information about the use-livecode