Skip to Content.
Sympa Menu

freetds - Re: [freetds] Fwd: dbrpcparam and varchar(max) column

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Joshua Lang <joshua.h.lang AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Fwd: dbrpcparam and varchar(max) column
  • Date: Mon, 7 Mar 2016 10:45:10 -0800

I ran into this same problem a few months back:
https://lists.ibiblio.org/sympa/arc/freetds/2015q4/029664.html

A workaround is to use the TEXT type (SYBTEXT) instead. I haven't
extensively tested it, but it seems to work for the basic cases I have
tested, such as yours.

On Tue, Mar 1, 2016 at 1:46 AM, Igor Anić <igor.anic AT gmail.com> wrote:

> I'have stored procedure with output param of datatype varchar(max) and
> can't find the way to pass string longer than 8000 characters.
>
> Setting 5th parameter in dbrpcparam (maxlen) to value greater then 8000 has
> no effect. In sql server profiler varchar is always declared with max 8000
> in size. Setting maxlen to 0 has the same effect.
> From profiler:
>
> declare @p1 varchar(8000)
> set @p1=' ... '
> exec test_sp_varchar_max @p1=@p1 output
> select @p1
>
>
> What is the right way to use stored procedures with varchar(max) datatype.
>
> Thanks,
> Igor.
>
> dbrpcparam reference:
>
> http://www.freetds.org/reference/a00342.html#ga98b9b5db66975dafae8d422218e4de45
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>




Archive powered by MHonArc 2.6.24.

Top of Page