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

Brandon Black blblack at gmail.com
Thu Sep 7 15:21:52 CEST 2006


On 9/5/06, Robert Dobbs <bobisdobbs at hotmail.com> wrote:
>
> > > 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?
> >
> >In your schema class. It's not really documented in ::Schema, but it's
> >in the source:
> >
> >__PACKAGE__->mk_classdata('storage_type' => '::DBI');
> >
> >I'd assume you can just set it to ::DBI::MSSQL or ::DBI::Sybase::MSSQL
>
> Ugh!  Yes, I tried that (to '::DBI::Sybase::MSSQL' and '::DBI::MSSQL') but
> then this happens on a 'create':
>
> ct_send(CS_DESCRIBE_INPUT) returned 0 at /usr/lib/perl5/DBD/Sybase.pm line
> 124.
> Segmentation fault
>
> However, if I set it to '::DBI::Sybase' it works correctly to save!  I get
> back the ID.  Weird, since I am using MSSQL.
>
> Except then loading InflateColumn::DateTime doesn't work.
>
> Invalid date format: Sep  1 2006 05:13PM at
> /usr/local/share/perl/5.8.8/DBIx/Class/InflateColumn/DateTime.pm line 63
>    (InflateColumn 83, etc...)


Setting it manually via Schema->storage_type('::DBI::Sybase::MSSQL') is the
"right thing" to do which has worked for others.  Can you guve more
specifics on what's generating the ct_send() errors in that case?

-- Brandon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/dbix-class/attachments/20060907/ebffda3e/attachment.htm 


More information about the Dbix-class mailing list