dbTalk Databases Forums  

Length of String global variables

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


Discuss Length of String global variables in the microsoft.public.sqlserver.dts forum.



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

Default Length of String global variables - 06-22-2004 , 11:21 AM






Hello,
Does anyone know the maximum length of global variable of type "String" in DTS.

I have a string (greater than 180) that works its way out through a stored procedure hierarchy, back out into DTS and then inserted into a table. The string ends up length 180 and the only way I can envisage that it is getting truncated is when it comes into my DTS GV.

Hence, I'm hoping that the answer to my question (above) is 180 because that would expalin the strange behaviour that I am seeing.

Any help much appreciated.
Jamie Thomson

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

Default Re: Length of String global variables - 06-22-2004 , 11:56 AM






Try this


Function Main()

DTSGlobalVariables("MyVar180").Value = "IamOver 180 chars long
x x
x x 181"

Msgbox len(DTSGlobalVariables("MyVar180").Value)


Main = DTSTaskExecResult_Success
End Function


I get

183



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Jamie" <Jamie (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hello,
Does anyone know the maximum length of global variable of type "String" in
DTS.

I have a string (greater than 180) that works its way out through a stored
procedure hierarchy, back out into DTS and then inserted into a table. The
string ends up length 180 and the only way I can envisage that it is getting
truncated is when it comes into my DTS GV.
Quote:
Hence, I'm hoping that the answer to my question (above) is 180 because
that would expalin the strange behaviour that I am seeing.

Any help much appreciated.
Jamie Thomson



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

Default Re: Length of String global variables - 06-23-2004 , 02:33 AM



Thanks Allan,
That helped me to prove the problem wasn't what I was hoping it was.

Regards
Jamie

"Allan Mitchell" wrote:

Quote:
Try this


Function Main()

DTSGlobalVariables("MyVar180").Value = "IamOver 180 chars long
x x
x x 181"

Msgbox len(DTSGlobalVariables("MyVar180").Value)


Main = DTSTaskExecResult_Success
End Function


I get

183



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Jamie" <Jamie (AT) discussions (DOT) microsoft.com> wrote in message
news:6B364FDE-A5F0-477F-A347-AFD6C2F36F77 (AT) microsoft (DOT) com...
Hello,
Does anyone know the maximum length of global variable of type "String" in
DTS.

I have a string (greater than 180) that works its way out through a stored
procedure hierarchy, back out into DTS and then inserted into a table. The
string ends up length 180 and the only way I can envisage that it is getting
truncated is when it comes into my DTS GV.

Hence, I'm hoping that the answer to my question (above) is 180 because
that would expalin the strange behaviour that I am seeing.

Any help much appreciated.
Jamie Thomson




Reply With Quote
  #4  
Old   
Jamie
 
Posts: n/a

Default Re: Length of String global variables - 06-23-2004 , 02:42 AM



FYI: In fact using an adapted method I've been able to build a string >4MB so far. I've stopped now!!!

"Jamie" wrote:

Quote:
Thanks Allan,
That helped me to prove the problem wasn't what I was hoping it was.

Regards
Jamie

"Allan Mitchell" wrote:

Try this


Function Main()

DTSGlobalVariables("MyVar180").Value = "IamOver 180 chars long
x x
x x 181"

Msgbox len(DTSGlobalVariables("MyVar180").Value)


Main = DTSTaskExecResult_Success
End Function


I get

183



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Jamie" <Jamie (AT) discussions (DOT) microsoft.com> wrote in message
news:6B364FDE-A5F0-477F-A347-AFD6C2F36F77 (AT) microsoft (DOT) com...
Hello,
Does anyone know the maximum length of global variable of type "String" in
DTS.

I have a string (greater than 180) that works its way out through a stored
procedure hierarchy, back out into DTS and then inserted into a table. The
string ends up length 180 and the only way I can envisage that it is getting
truncated is when it comes into my DTS GV.

Hence, I'm hoping that the answer to my question (above) is 180 because
that would expalin the strange behaviour that I am seeing.

Any help much appreciated.
Jamie Thomson




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.