CGI:Session & MS SQLServer

Discussion in 'Perl Misc' started by Ben_Morley, Feb 21, 2007.

  1. Ben_Morley

    Ben_Morley Guest

    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, Feb 21, 2007
    #1
    1. Advertising

  2. Ben_Morley

    Ben_Morley Guest

    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" <> 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!
     
    Ben_Morley, Feb 28, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TSelvan
    Replies:
    1
    Views:
    1,781
    Natty Gur
    Jul 30, 2003
  2. quique

    session state - SqlServer

    quique, Nov 12, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    737
    Cowboy \(Gregory A. Beamer\)
    Nov 12, 2003
  3. A

    SQLServer session state

    A, Nov 19, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    1,591
  4. John Q. Smith

    SQLServer session state performance issues

    John Q. Smith, Jan 12, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    3,453
    =?Utf-8?B?Sm9obiBRIFNtaXRo?=
    Jan 16, 2004
  5. =?Utf-8?B?SmVmZnJleQ==?=

    Upgrading ASP w/SQLserver 2000 to ASP.NET w/ SQLserver 2005

    =?Utf-8?B?SmVmZnJleQ==?=, Apr 6, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    482
    sloan
    Apr 27, 2007
Loading...

Share This Page