Re: DBI in a web context



Read up on how to connect in the first place - you can pass
a switch that tells it to return errors to you, instead of killing
your whole script.

Look here:-
http://search.cpan.org/~pythian/DBD-Oracle-1.19/Oracle.pm#plsql_errstr
and search for "RaiseError"

"Robert Hicks" <sigzero@xxxxxxxxx> wrote in message
news:20061110204022.18141.qmail@xxxxxxxxxxxxxxxxxxxxxxx
I have a couple forms for an in-house application. The user fills out the
fields and then submits which update a back end Oracle database.

I have looked for examples but can't really find anything.

How is it best to catch errors when doing DBI stuff in web applications?
Wrap the insert "code" in an eval statement? Croak or die statements? I am
thinking eval because I can set autocommit to "off" and then do rollbacks
if $@ has an error.

Suggestions and comments welcome?

Robert


.



Relevant Pages