[Dbix-class] MSSQL connection error - DBIx::Class 0.08113

fREW Schmidt frioux at gmail.com
Sat Nov 14 20:26:52 GMT 2009


On Sat, Nov 14, 2009 at 12:49 PM, Alan Humphrey
<alan.humphrey at comcast.net> wrote:
> Just upgraded to 0.08113 and ran a small test script against a MSSQL 2005
> database.  Connection is made via FreeTDS.  Here's the error.  Relevant
> lines of the program below.
>
> DBIx::Class::ResultSet::next(): Unable to estable connection to determine
> database type: DBIx::Class::ResultSet::next(): DBI Exception:
> DBD::Sybase::db do failed: Server message number=195 severity=15 state=5
> line=1 server=SQLA4 text='CHAINED' is not a recognized option. [for
> Statement "SET CHAINED OFF"] at test.pl line 26
>
>
> my $schema =
> BirdWeb::BirdWebSchema->connect('DBI:Sybase:server=SNAME;database=DBNAME','L
> OGIN','PASSWORD',{disable_sth_caching=>1});
>
>
> my $result = $schema->resultset('SurveyorsSurveySites')->search({},
>    {join => 'surveyor',
>     order_by => ['surveyor.name'],
>     page => 5
>     });
>
>
> while (my $row = $result->next() ){
>    say $row->name . "\t" . $row->surveysites->first()->year;
> }
>
>
> http://download.microsoft.com/download/e/c/8/ec8d5025-7ef7-4dcc-a9f3-9c297cf
> 5350e/SSMASybase.docx has this:
>
> SET CHAINED
> Issue
> SQL Server 2005 does not support SET CHAINED.
>
> SSMA support
> Yes
>
> Solution
> Change SET CHAINED to SET IMPLICIT_TRANSACTIONS.
>
>
>
> - Alan
>
>
>
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk
>


Does this happen consistently?  I had this issue and it just went away
after a bunch of tries, so debugging this got impossible.

-- 
fREW Schmidt
http://blog.afoolishmanifesto.com



More information about the DBIx-Class mailing list