dbTalk Databases Forums  

Global Variable Passed As Parameter To Sproc Is Truncated

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Global Variable Passed As Parameter To Sproc Is Truncated in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
DeniseMe
 
Posts: n/a

Default Global Variable Passed As Parameter To Sproc Is Truncated - 03-10-2006 , 08:55 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

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Global Variable Passed As Parameter To Sproc Is Truncated - 03-11-2006 , 03:45 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

Quote:
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




Reply With Quote
  #3  
Old   
DeniseMe
 
Posts: n/a

Default Re: Global Variable Passed As Parameter To Sproc Is Truncated - 03-29-2006 , 04:33 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:

Quote:
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





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.