> i have just written a stored procedure in SQL 7 that inserts
> a row in the order table, which in turn sets off a trigger
> to update the stock. if there is not enough stock, the trigger
> raise an error using RAISERROR. the problem now is that the
> stored procedure cannot trap the error and the error is
> immediately returned to CF.
I'd recommend that you move the logic from the trigger to the stored
procedure; I generally don't use triggers unless the database will run SQL
sent directly from an application.
That being said, if you keep the trigger, RAISERROR will always return a
message directly to the client (in this case, CF), so you'd need to wrap
your stored procedure call within an exception handler and trap the raised
error there.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.