in reply to Perl DBI execute statement

Both your statements are called from $dbh2. Note that some DBD drivers (you didn't say which one you use) don't allow execution of a statement while another statement is still running, you need another connection for that. See for example Can i execute two queries connecting to same DB at a time..

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Perl DBI execute statement
by Tux (Canon) on Dec 12, 2016 at 12:09 UTC

    I think *all* DBD's allow multiple select handles running at the same time on the same database handle. Some DBD's however do not allow two handles on the same table running simultaneously. Other DBD's do not allow mixing simultaneous handles on the same table that alter the table, like select+delete, select+update, update+delete, select+insert, update+insert, insert+delete etc. Most likely it is not the DBD that imposes these restrictions, but the (commit model of the) underlying database.


    Enjoy, Have FUN! H.Merijn

      Last time I uses DBD::ODBC with MS SQL Server 7 and 2000, only one statement could be active at any time, due to protocol limitiations of the MS SQL Server and its predecessor Sybase.

      The protocol has been "extended" (or should I say botched?) since then to allow a complete different way for other SQL statements to execute in parallel to the main statement (I think this is called MARS). See DBD::ODBC::FAQ and http://www.easysoft.com/developer/languages/perl/multiple-active-statements.html for the ugly details.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)