CGI:Session & MS SQLServer

B

Ben_Morley

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!
 
B

Ben_Morley

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top