> A real world scenario is when a user tries to insert a value that must be 
> unique in the database. If a duplicate
> is found, SQL can return a reference code and a message stating that there is 
> a duplicate found, an exception
> is thrown and an id is passed back - RAISERROR & @@ERROR.
>
> When this is thrown, the message states "[Macromedia][SQLServer JDBC Driver]" 
> and then the RAISERROR
> message following. Nice for debugging but not so nice for passing the message 
> and error code to a handler.
>
> I would really like to be able to use the error codes and have a handler 
> method based on which code it passed
> back. Not really possible. Kind of hokey not to throw a SQL exception (and 
> pass back a value instead) since you
> would want SQL Server to log the exception.

I don't understand the problem. Just return the exception, catch it
with try/catch, and use the CFCATCH data to see the exception data.
SQL Server will log the exception, and you can choose how to present
it in CF.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325750
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to