dbTalk Databases Forums  

String truncated when initializing Global Variables from INI file using DP Task

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


Discuss String truncated when initializing Global Variables from INI file using DP Task in the microsoft.public.sqlserver.dts forum.



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

Default String truncated when initializing Global Variables from INI file using DP Task - 08-20-2004 , 01:07 PM






i was wondering if anyone had experienced this before or even better
knew of a fix. I am using an INI file to initialize several global
variables in my DTS Package through a Dynamic Properties Task. some of
the values are quoted strings which define columns for building a data
set. these strings can get fairly long in some cases, well over 255
characters.

the Global Variables i am populating are defined as Strings in the DTS
Designer, but the literal type is a BSTR. i know that this data type
can accomodate my strings (other global variables that are populated
dynamically contain thousands of characters).

my guess right now is that the problem is related to the OLE DB Text
File Provider for DTS. i have seen many posts related to truncation of
strings during exports, but i have been unable to find a single thread
about truncation using a DP Task and an INI file.

since i have no direct access to the connection used to open this INI
file and the DP Task does not have any properties which could address
this issue, is there some other fix i should be looking for?

i realize i can use an ActiveX Script Task to read these values in
through a separate step, but i would love to address the problem
through the object model.

any thoughts out there?

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: String truncated when initializing Global Variables from INI file using DP Task - 08-20-2004 , 03:04 PM






In message <96711523.0408201007.55332eca (AT) posting (DOT) google.com>, mike k
<punchmk (AT) hotmail (DOT) com> writes
Quote:
i was wondering if anyone had experienced this before or even better
knew of a fix. I am using an INI file to initialize several global
variables in my DTS Package through a Dynamic Properties Task. some of
the values are quoted strings which define columns for building a data
set. these strings can get fairly long in some cases, well over 255
characters.

the Global Variables i am populating are defined as Strings in the DTS
Designer, but the literal type is a BSTR. i know that this data type
can accomodate my strings (other global variables that are populated
dynamically contain thousands of characters).

my guess right now is that the problem is related to the OLE DB Text
File Provider for DTS. i have seen many posts related to truncation of
strings during exports, but i have been unable to find a single thread
about truncation using a DP Task and an INI file.

since i have no direct access to the connection used to open this INI
file and the DP Task does not have any properties which could address
this issue, is there some other fix i should be looking for?

i realize i can use an ActiveX Script Task to read these values in
through a separate step, but i would love to address the problem
through the object model.

any thoughts out there?
There is a limit in the length of strings you can use though INI files,
probably related back to the original INI file API used under the covers
I expect.

I did some tests a long time ago, and found that there is a limit is 254
characters.

There an also be issues with exproting lomg character strings, but this
is really a designer bug, not a DTS bug, as you can overcome this quite
easily-

DataPump truncates delimited fields to 255 characters
(http://www.sqldts.com/default.aspx?297)

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.