[Dbix-class] can't get PK::Auto with MSSQL thru Sybase - fix?

Robert Dobbs bobisdobbs at hotmail.com
Tue Sep 5 22:22:45 CEST 2006




> > Hey guess what.  This doesn't seem to matter.  As a test, I changed line 
>941
> > of DBIC:Storage::DBI to do "return $self->dbh->selectrow_array('SELECT
> > @@IDENTITY')" and it works great.  I think the subclassed PK::Auto for
> > MS-SQL needs to be brought back to life.
>
>Be aware, @@IDENTITY can lead to odd things (MSSQL)...

Hey this is pretty weird.  DBIx::Class::Storage::DBI::Sybase::MSSQL uses 
@@IDENTITY.  So let's just assume that's okay for the moment.

But for some reason, my storage is not a 
DBIx::Class::Storage::DBI::Sybase::MSSQL.  Class::C3::calculateMRO yields 
(DBIx::Class::Storage::DBI::Sybase DBIx::Class::Storage::DBI::NoBindVars 
DBIx::Class::Storage::DBI DBIx::Class::AccessorGroup DBIx::Class::Storage 
DBIx::Class DBIx::Class::Componentised Class::Data::Accessor).

That would probably be because my connect info gives no indication that it 
is MSSQL - I am using the FreeTDS sybase driver, and it doesn't need that.

Where do I set storage_type to ::DBI::Sybase::MSSQL?

Mark

_________________________________________________________________
Search from any web page with powerful protection. Get the FREE Windows Live 
Toolbar Today!   http://get.live.com/toolbar/overview




More information about the Dbix-class mailing list