Re: How to discard the error in SQL query

[email protected] (Ovid)
Newsgroups perl.dbi.users
Message-ID <[email protected]>
----- Original Message ----
> From: Parag Kalra <[email protected]>


> I am executing list of SQL queries from a file. Currently if 
> there is an error (like syntax issue) in any of the sql query it doesn't 
> processes the other remainig queries.
>
> I tried executing the queries in  'eval' but it doesn't seem to work. I am
> using DBI and DBD::Oracle


Without seeing the code and seeing the error, it's not possible to know exactly what is going wrong here.

If you're trying to process several sql queries with a single $dbh->do, then it's quite natural than an eval won't allow subsequent queries to execute because they're all in the same transaction.

It's also possible that you're trying to execute the sql statements separately, but it's failing on query which inserts data that subsequent queries are dependant on.  Again, it's not possible to say if this is what's happening without seeing some code and error messages.


Cheers,
Ovid
 --
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog - http://blogs.perl.org/users/ovid/
Twitter - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.