"revdberr, " as the returned value on *successful* postgres operations

Mike Bonner bonnmike at gmail.com
Tue May 14 13:11:04 EDT 2013


Right, if you're using a transaction block then yes you need the
intermediate semicolons added yourself. (unless you're using multiple
separate revexecutesql statements rather than handing off a complete list
in 1 go)

So yeah if you do

revexecutesql with your begin transaction

a repeat with a revexecutesql for each command to use


and a revexecutesql with a commit after the repeat then no semicolons
should be added. Since you're building the whole thing and then sending it
as a unit, all but the last would be needed as you surmise.

I was just going based on the code you posted previously so was unsure of
your method.





On Tue, May 14, 2013 at 11:03 AM, Dr. Hawkins <dochawk at gmail.com> wrote:

> On Mon, May 13, 2013 at 7:11 PM, Mike Bonner <bonnmike at gmail.com> wrote:
>
> > Are you adding the ; at the end of your sql strings?  I'm pretty sure rev
> > appends its own ; so the result would be an extra one. Which might make
> > postgres a) do whatever you told it to, then b) return a confused error
> due
> > to the second ;
> >
> > Try it without adding the ;
> >
>
> I took off the trailing semicolon:
>
> BEGIN TRANSACTION;
> UPDATE  baggins_bilbo____001_sofa SET A = 'Ape guy', B = 'Sunday', C = '9
> banana', D = '', usr= '', tstmp = NOW() WHERE uniq_sfky =7;
> UPDATE dhbk_dtIdx SET lastOpened=NOW(), usr=' ' WHERE
> dtStem='baggins_bilbo____001';
> COMMIT
>
>  and still get the same message.
>
> Livecode certainly isn't adding semicolon after every line--if I take out
> the others, the UPDATE throws an error.
>
> I've also seen the same issue with single transactions outside of BEGIN
> blocks.
>
>
> --
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list