sql parameters truncated to 80 char

chad phillips <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Hi,

When I run a select against MSSQL, my sql parameters get limited to 80
characters.  I am trying to run a query against a varchar(250) field, buy my
parameters get cut off at 80 characters.

I am using FreeTDS on a linux box to connect to MSSQL.  We are using perl.
The protocol is set to 8.0.  I ran profiler and trapped the sql that is
sent.  In the sql you can see where it sets the field to varchar(80) instead
of varchar(250).

Any suggestions on how I can fix this?

thanks
chad

DECLARE @p1 INT
SET @p1 = NULL
EXEC sp_prepare @p1 OUTPUT, N'@P1 varchar(80)',
    N'
       SELECT distinct
       ses_title,
                ses_code,
                ses_start_date,
                ses_start_time,
                ses_end_time,
                lrm_name


       FROM     dbo.ev_event
                JOIN dbo.ev_session ON evt_key = ses_evt_key
                                       AND ses_delete_flag = 0
                                       AND evt_code = ''ASA2010''
                JOIN dbo.ev_session_ext ON ses_key = ses_key_ext
                LEFT JOIN dbo.client_aafp_m09_cme_session ON ses_m09_key_ext
= m09_key
                LEFT JOIN ev_event_session_room ON esr_ses_key = ses_key
                LEFT JOIN ev_event_location_room ON lrm_key = esr_lrm_key
                LEFT JOIN ev_event_location ON evl_key = lrm_evl_key
                left join ev_location (nolock) on loc_key = evl_loc_key
                LEFT JOIN dbo.ev_session_track_type ON ses_set_key = set_key
       where
            ses_title = @p1
      order by  ses_start_date, ses_start_time
       ', 1
select @p1
EXEC sp_execute 1,    'Cardiac Arrhythmias (including atrial fibrillation):
A Brief Review of Cardiac Arrhythmias'
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.