http://www.perlmonks.org?node_id=1014993


in reply to Perl Query Locks A MsSQL Database

Agree with Corion, try reading everything into a large array first then parse through it.

Also, potentially a dumb question because I don't do a lot of DB work within Perl, but is there any reason you're executing your statement within an eval?

Replies are listed 'Best First'.
Re^2: Perl Query Locks A MsSQL Database
by vincent_veyron (Sexton) on Jan 25, 2013 at 18:08 UTC

    "is there any reason you're executing your statement within an eval?"
    From perldoc -f eval : It is Perl's exception trapping mechanism; so you can trap errors and write eg :

    if ( $@ ) { if ( $@ =~ /foreign key/ ) { } else { }
    http://vincentveyron.com Logiciels de gestion des contentieux juridiques et des sinistres d'assurance