[Dbix-class] can't get PK::Auto with MSSQL thru Sybase - fix?
Robert Dobbs
bobisdobbs at hotmail.com
Tue Sep 5 23:05:58 CEST 2006
> > 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...)
Mark
_________________________________________________________________
Call friends with PC-to-PC calling -- FREE
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
More information about the Dbix-class
mailing list