revDataFromQuery and DELETE FROM

Ralph DiMola rdimola at evergreeninfo.net
Wed Aug 20 20:16:14 EDT 2014


+1

Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net


-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of Peter Haworth
Sent: Wednesday, August 20, 2014 8:11 PM
To: How to use LiveCode
Subject: Re: revDataFromQuery and DELETE FROM

Yes, but there is no "panic" here it's a false error seemingly caused by
using revDataFromQuery for something other than a SELECT statement.

I know it shouldn't do that and that you have a bug at the QCC about it but
bottom line is, using revDataFromQuery or revQueryDatabase to execute
anything other than a SELECT statement is asking for trouble.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>


On Wed, Aug 20, 2014 at 3:09 PM, Dr. Hawkins <dochawk at gmail.com> wrote:

> On Sun, Aug 17, 2014 at 8:33 PM, Dan Friedman 
> <dan at clearvisiontech.com>
> wrote:
>
> > Thanks for the reply.   The entire error string is "revdberr," (with the
> > comma).  I tried your suggestion of using revExecuteSQL instead of
> > revDataFromQuery() and I did not get the error. So at least I have a 
> > suitable workaround.  Thanks for the assist!
> >
>
> I try to always check my results and trigger a "panic" that shows the 
> returned error when a query fails.
>
> For this one, I just take an exact match of "revdberr," as a success code.
> So
>
> if theRes <> "revdberr" then
> panic "bad delete in someFunction" & cr & cr & theRes end if
>
> If you're *not* checking your return codes, you're asking for pain . . .
>
> --
> 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
>
_______________________________________________
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