[Catalyst] Issues with Session::Store::DBIC + MSSQL

Daniel Westermann-Clark dwc at pobox.com
Tue Aug 4 21:12:24 GMT 2009


On 2009-08-04 10:20:22 -0500, fREW Schmidt wrote:
> I am trying to set up Session::Store::DBIC but I am getting no love.
> Here is all of the relevant (afaik) data:
> 
> Error:
> 
> [Tue Aug 4 09:54:25 2009] acd_server.pl:
> > DBIx::Class::ResultSet::find_or_create(): DBI Exception: DBD::ODBC::st
> > fetchrow_array failed: [Microsoft][SQL Native Client]String data, right
> > truncation (SQL-01004) [for Statement "SELECT me.id, me.session_data,
> > me.expires FROM Session me WHERE ( me.id = ? )" with ParamValues:
> > 1='session:c28d6383a2b334128738f4b70ee08ff7df5cd737'] at
> > c:/strawberry/perl/site/lib/Catalyst/Plugin/Session/Store/DBIC/Delegate.pm
> > line 73

That session ID is 48 characters long, but your table was created with
a column length of 72 characters (as recommended in the docs).

Could you try creating the table using a VARCHAR instead of CHAR?
Perhaps MSSQL is being strict about the length of the input string.

If this turns out to be the case, think you could throw together a doc
patch?

> SQL Creation Script
> 
> CREATE TABLE dbo.Session
> > (
> > id char(72) NOT NULL,
> > session_data text,
> > expires int
> > ) ON [PRIMARY]
> > TEXTIMAGE_ON [PRIMARY]
> > GO

-- 
Daniel Westermann-Clark



More information about the Catalyst mailing list