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

Alan Humphrey alan.humphrey at comcast.net
Sat Nov 14 18:49:45 GMT 2009


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






More information about the DBIx-Class mailing list