|
Home > Archive > MS SQL Server DTS > March 2006 > Global Variable Passed As Parameter To Sproc Is Truncated
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 |
Global Variable Passed As Parameter To Sproc Is Truncated
|
|
| DeniseMe 2006-03-10, 9:25 am |
| Hello All,
I have an Execute SQL task that calls a sproc and sets a parameter of that
sproc to a global variable of type String. The global variable will be
probably at least 25 characters long. For some reason when it is sent to the
sproc it gets cut off at 10 characters. The parameter that it is populating
in the sproc is a varchar(8000). Any idea why this gv is getting cut off at
10 once the sproc gets it? It happens immediately, before the sproc does
anything with any of the params it is cutoff! I have verified that the gv is
its full length within the DTS pkg (I have inserted it into a test table I
setup and the whole string shows up there).
Thanks for your help in advance - it is much appreciated!
Denise
| |
| Allan Mitchell 2006-03-11, 7:23 am |
| Hello DeniseMe,
It is a strange one. Is there anything special about the value in the variable?
So you have checkd that before being passed to the proc it is the correct
length but when passed to the proc it is incorrect?
How did you check?
Did you look at Profiler to see what was passed?
Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com
> Hello All,
>
> I have an Execute SQL task that calls a sproc and sets a parameter of
> that sproc to a global variable of type String. The global variable
> will be probably at least 25 characters long. For some reason when it
> is sent to the sproc it gets cut off at 10 characters. The parameter
> that it is populating in the sproc is a varchar(8000). Any idea why
> this gv is getting cut off at 10 once the sproc gets it? It happens
> immediately, before the sproc does anything with any of the params it
> is cutoff! I have verified that the gv is its full length within the
> DTS pkg (I have inserted it into a test table I setup and the whole
> string shows up there).
>
> Thanks for your help in advance - it is much appreciated!
>
> Denise
>
| |
| DeniseMe 2006-03-29, 8:27 pm |
| Allan,
I have found a work-around for this weird one - if I call a different stored
procedure that I created and pass the variable to it, it doesn't truncate it,
and then within this newly created stored procedure, I call the problematic
stored procedure and it works then without truncating that variable. I guess
I don't have an answer as to why or what is different about the problematic
stored procedure then any other proc we have in our database, but at least I
can get around the problem now!!!
Thanks for your help - I appreciate it!
Thanks,
Denise
"Allan Mitchell" wrote:
> Hello DeniseMe,
>
> It is a strange one. Is there anything special about the value in the variable?
>
> So you have checkd that before being passed to the proc it is the correct
> length but when passed to the proc it is incorrect?
>
> How did you check?
>
> Did you look at Profiler to see what was passed?
>
>
>
>
> Allan Mitchell
> www.SQLDTS.com
> www.SQLIS.com
> www.Konesans.com
>
>
>
>
|
|
|
|
|