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() & "]"
end if 

NOTE queryFailed(); querySucceded() ; failed() and succeded() all setLastError() prior 
to making any judgements.

K

-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
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
them
is left as an exercise for the reader. The question of the existence of
the reader
 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 < [EMAIL PROTECTED] > wrote:
From: Sarah Reichelt [mailto: [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
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!
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to