revDataFromQuery and DELETE FROM

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


Using the revExecuteSQL returns the number of deleted/inserted/updated rows
in the result. Then the test is:

If the result is not a number then
--Error code here
End if

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 Dr. Hawkins
Sent: Wednesday, August 20, 2014 6:09 PM
To: How to use LiveCode
Subject: Re: revDataFromQuery and DELETE FROM

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





More information about the use-livecode mailing list