AnsweredAssumed Answered

Set Field doesn't copy to other table

Question asked by lkeyes on Dec 21, 2012
Latest reply on Apr 15, 2015 by Fred(CH)

I know I'm missing something somewhere.


I'm building a "SQL workbench" layout, which allows placing a SQL statement in one field of a two-field layout, and which displays the results in the second field. Works like a charm. But, now I'm trying to copy the SQL statement into another table (called the Buffer), which will eventually allow me to go back and retrieve previous SQL statements that I've put in. (I'm basically trying to duplicate the functionality of the FoxPro or MySQL SQL interface at the command line...)




I've tried using SET Field for this, (note that it works in the Execute SQL statement, just fine (in the last statement of the script). But nothing gets copied in.

I've tried moving to the layout for the buffer table, even though SET Field supposedly doesn't require it.






TIA -- Larry






# Write the contents of the current query into the buffer.

Go to Layout [ “Buffer” (Buffer) ]

New Record/Request

Go to Field [ Buffer::SQLString ]

Set Field [ Buffer::SQLString; SQL_Experiment::Query_Field ]

Commit Records/Requests

Go to Layout [ original layout ]

# Execute the current query in the buffer

Set Field [ SQL_Experiment::Answer_Field; ExecuteSQL ( SQL_Experiment::Query_Field; "" ; "") ]