Arden,
If the query truly fails, you'll get an error from the DBMS. If "failure" is
the query running without affecting any rows, you can check @@rowcount after
executing the statement:
UPDATE foo
SET bar = 1
WHERE id = 2
SELECT @@rowcount
This is on SQL Server and Sybase. I'm sure others have similar
functionality.
Cheers,
Seva Petrov
> -----Original Message-----
> From: Arden Weiss [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, March 31, 2001 10:39 AM
> To: CF-Talk
> Subject: How to tell if a QUERY UPDATE fails.
>
>
> I know how to tell if a QUERY SELECT fails -- recordcount() is zero.
>
> How do you tell if a QUERY UPDATE or QUERY INSERT fails??
>
> ^
> / \__
> ( @\___
> / O
> / (_____/
> /_____/
> Whoof...
> 410-757-3487
>
> -----Original Message-----
> From: Bud [SMTP:[EMAIL PROTECTED]]
> Sent: Saturday, March 31, 2001 10:09 AM
> To: CF-Talk
> Subject: RE: SELECT * Queries
>
> On 3/31/01, Arden Weiss penned:
> >Simple question from my older twin -- what do you do to get these
> >timings -- haven't done it before (obviously).
>
> The template execution time and query times are shown when
> debugging is active.
> --
>
> Bud Schneehagen - Tropical Web Creations
>
> _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
> ColdFusion Solutions / eCommerce Development
> [EMAIL PROTECTED]
> http://www.twcreations.com/
> 954.721.3452
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists