SQL UPDATE statements (confused again)
nnoydb at excite.com
Thu Jun 3 09:59:07 CDT 2004
What I found was that revdb_execute returns the number of rows or the error. The error is not only "revdberr,description" but also "ERROR: description". I create a function to test for the cases and return true or false.
if queryFailed( tRows ) then
return "Error process query [" & getLastError() & "]"
NOTE queryFailed(); querySucceded() ; failed() and succeded() all setLastError() prior to making any judgements.
Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
Any resemblance between the above and my own views is non-deterministic.
The question of the existence of views in the absence of anyone to hold
is left as an exercise for the reader. The question of the existence of
is left as an exercise for the second god coefficient.
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)
--- On Wed 06/02, Sarah Reichelt < sarahr at genesearch.com.au > wrote:
From: Sarah Reichelt [mailto: sarahr at genesearch.com.au]
To: nnoydb at excite.com, use-revolution at lists.runrev.com
Date: Wed, 2 Jun 2004 15:12:43 +1000
Subject: Re: SQL UPDATE statements (confused again)
On 2 Jun 2004, at 12:55 am, K wrote:<br><br>> Confused again! Okay revdb_execute return the number of rows <br>> modified. This would make a 0 (zero) return value a indeterminate <br>> state. Since one cannot tell if 0 (zero) rows where modified or if a <br>> error occured preventing the statement from executing. How does one <br>> tell the difference?<br>><br>I can't test this at the moment, but are you sure an error returns <br>zero? I had thought that if the result was a number, the command had <br>executed correctly and the result was the number of rows modified. If <br>there is an error the result will be more than just a single number. I <br>may be wrong, but it is an idea for you to check out.<br><br>Cheers,<br>Sarah<br><br>
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
More information about the use-livecode