on-rev queries

Bob Sneidar bobs at twft.com
Tue Feb 2 16:59:11 EST 2010


Hi all. Executing queries directly with the on-rev mySQL database I have seems to beach ball Revolution at times. 

I just tried executing the query: 

DROP TABLE `slylabs_helpdesk`.`categories`

EVENTUALLY Revolution will let go/time out and although no error is generated inside of a try/catch construct, the command nevertheless fails. I have run into the same problem when adding tables. Sometimes the command works some times it doesn't. Some times it takes a really long time and some times it doesn't. There's no connection either between it taking a long time and whether or not the command succeeds. 

   put "`" into sq
   put "slylabs_helpdesk" into fPriDBName
   put "categories" into theClickTbl
   put "DROP TABLE " & sq & field fPriDBName & sq & "." & \
           sq & theClickTbl & sq into theSQL
   try
       put dbconn_get("connection id", "priconn", "primary") into theID -- returns a number
       revExecuteSQL theID, theSQL
       put true into successful
   catch theError
       put false into successful
   end try

this is the code. successful is true after executing this code, EVEN IF the table NEVER GETS DROPPED!

I guess I need to know if the on-rev mySQL even allows direct access via a Revolution script! It is possible that sqlYoga is somehow returning a stale connection ID, but that is just a guess. 

Bob




More information about the use-livecode mailing list