From: Rafael Kitover Date: Tue, 18 Aug 2009 04:19:12 +0000 (+0000) Subject: always reconnect in odbc:mssql:connect_call_use_dynamic_cursors X-Git-Tag: v0.08109~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=75517ea94be08dd4e55ca49f166f7458b0b7021f;p=dbsrgits%2FDBIx-Class.git always reconnect in odbc:mssql:connect_call_use_dynamic_cursors --- diff --git a/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm b/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm index 5279502..47293d4 100644 --- a/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm +++ b/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm @@ -75,9 +75,8 @@ sub connect_call_use_dynamic_cursors { if (not exists $dbi_attrs->{odbc_cursortype}) { # turn on support for multiple concurrent statements, unless overridden $dbi_attrs->{odbc_cursortype} = 2; - my $connected = defined $self->_dbh; - $self->disconnect; - $self->ensure_connected if $connected; + $self->disconnect; # resetting dbi attrs, so have to reconnect + $self->ensure_connected; $self->_set_dynamic_cursors; } }