Home > Archive > PERL Miscellaneous > February 2007 > CGI:Session & MS SQLServer
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
CGI:Session & MS SQLServer
|
|
| Ben_Morley 2007-02-21, 7:06 pm |
| Hi All,
I've been running an application for some time that uses CGI::Session
and it's MySQL Driver. However, I'd like to make the application
database portable and I'm unable to get it to work correctly with
SQLServer2005.
I have written a dummy driver called "mssql" based on the default DBI
driver. It creates the session in the SQLServer2005 database, but I'm
never able to access that live session.
Any thoughts? Anyone have a driver built for SQLServer? Any success
at all? Thanks in advance!
| |
| Ben_Morley 2007-02-28, 7:03 pm |
| In case anyone else is struggling with this, the problem has to do
with a DBI error related to truncating a SQL Server TEXT field type.
You need to set a couple of statement handle parameters like so:
$sth->{LongTruncOk} = 1; #
$sth->{LongReadLen} = 500; # WHERE 500 IS THE LENGTH TO TRUNCATE AT
-- DEFAULT IS 80 CHARACTERS
On Feb 21, 2:04 pm, "Ben_Morley" <benjamin.m.mor...@gmail.com> wrote:
> Hi All,
>
> I've been running an application for some time that usesCGI::Session
> and it's MySQL Driver. However, I'd like to make the application
> database portable and I'm unable to get it to work correctly with
> SQLServer2005.
>
> I have written a dummy driver called "mssql" based on the default DBI
> driver. It creates thesessionin the SQLServer2005 database, but I'm
> never able to access that livesession.
>
> Any thoughts? Anyone have a driver built for SQLServer? Any success
> at all? Thanks in advance!
|
|
|
|
|