revdb_execute problem

mfstuart mfstuart at cox.net
Fri Aug 17 14:03:40 EDT 2007


Hi jbv,
With my experience using MS SQL, you define one statement (such as your
UPDATE), then on the next line type in "go" (without the double quotes),
then on the next line your next statement, then the "go" on the next line,
etc. The program "throws" that to SQL and executes all the statements,
sequentially.

I haven't tried this from Rev, but we use this in our product whenever we
deliver a "patch" for a customer to update/fix data - no problem.

Regards,
Mark



jbv wrote:
> 
> Hi list,
> 
> I'm trying to squeeze more than one SQL commands into 1 single
> revdb_execute
> request in a Rev cgi script.
> For instance :
> 
>     UPDATE myTable SET N = N + 1 WHERE id = 1 LIMIT 1 ; UPDATE myTable
> SET N = N + 1 WHERE id = 2 LIMIT 1 ;
> 
> I've tried all possible ways, like this one :
> 
>    put "UPDATE myTable SET N = N + 1 WHERE id = 1 LIMIT 1 ; " into
> myREQUEST
>    put "UPDATE myTable SET N = N + 1 WHERE id = 2 LIMIT 1 ;" after
> myREQUEST
>    put revdb_execute(theID, myREQUEST) into tQueryResult
> 
> The first SQL command executes fine, but I get a syntax error message
> from mySQL regarding the
> 2nd SQL command.
> 
> But when I paste the same set of 2 SQL commands into phpMyAdmin, then it
> works !!!
> 
> Any idea of what I could be missing ?
> The doc doesn't mention any limitation regarding the SQLQuery parameter
> of revdb_execute...
> 
> I'm using Rev cgi 2.5, mySQL 4.0.15 and phpMyAdmin 2.6.0
> 
> Thanks,
> JB
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 

-- 
View this message in context: http://www.nabble.com/revdb_execute-problem-tf4284430.html#a12204424
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list