How can I check sqlca.sqlcode from a stored procedure?
Posted in 2000
Topics: Stored Procedures & SPL, Error Codes & Troubleshooting
I am using Informix 7.23 and have a stored procedure that does an update. I want to be able to have the stored procedure return a value that indicates if the update was sucessful. SPL doesn't seem to support sqlca.sqlcode so how can I do this? This seems like a really basic feature. Am I just missing something? Thanks in advance, -Jeff Sent via Deja.com http://www.deja.com/ Before you buy.
jeffrey.schwartz@prudential.com wrote: > I am using Informix 7.23 and have a stored procedure that does an > update. I want to be able to have the stored procedure return a value > that indicates if the update was sucessful. SPL doesn't seem to support > sqlca.sqlcode so how can I do this? This seems like a really basic > feature. Am I just missing something? You're missing ON EXCEPTION and RAISE EXCEPTION? -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"
In article <3A15C6A7.727C8FED@informix.com>, Jonathan Leffler <jleffler@informix.com> wrote: > jeffrey.schwartz@prudential.com wrote: > > I am using Informix 7.23 and have a stored procedure that does an > > update. I want to be able to have the stored procedure return a value > > that indicates if the update was sucessful. SPL doesn't seem to support > > sqlca.sqlcode so how can I do this? This seems like a really basic > > feature. Am I just missing something? > > You're missing ON EXCEPTION and RAISE EXCEPTION? > > -- > Yours, > Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> > Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN > "I don't suffer from insanity; I enjoy every minute of it!" > Sent via Deja.com http://www.deja.com/ Before you buy.