Re: False string truncation error

From: Allan Mitchell (allan_at_no-spam.sqldts.com)
Date: 07/02/04


Date: Fri, 2 Jul 2004 08:16:12 +0100

The error would suggest you are trying to squeeze a string into a character
field that is not sized accordingley.

Try this

USE TempDb

GO

declare @s varchar(50)

set @s = 'DTS is the best ETL tool on the market'

CREATE TABLE HoldMyString(col1 varchar(20))

INSERT HoldMyString VALUES(@s)

GO

DROP TABLE HoldMyString

--Result

Msg 8152, Level 16, State 9, Line 6

String or binary data would be truncated.

The statement has been terminated.

-- 
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
"Jim Trowbridge" <jtrowbridge@adelaidebank.com.au> wrote in message
news:2483701c46000$df1b95d0$a601280a@phx.gbl...
> We haev a DTS package that this week has decided to fail
> with this error -
> Step Error Source: Microsoft Data Transformation Services
> (DTS) Package
> Step Error Description:The task reported failure on
> execution. (Microsoft OLE DB Provider for SQL Server
> (80040e57): The statement has been terminated.) (Microsoft
> OLE DB Provider for SQL Server (80040e57): String or
> binary data would be truncated.)
> Step Error code: 8004043B
> Step Error Help File:sqldts80.hlp
> Step Error Help Context ID:1100
>
> Only problem is, we can't find any truncation happening !
> or any bad data, or any error at all really !
>
> The package calls a stored procedure that runs several
> other procedures, that all write to a progress log table,
> and when the package fails, it appears that every log
> message has been produced indicating success on every step.
> I tried a profiler trace and got success all the way
> through, and then the package fails.
>
> Its got me confused !


Relevant Pages

  • Re: DTS Security
    ... But we still need to create a login into the SQL Server, ... the DTS package. ... For information about the Microsoft Strategic Technology ... > Protection Program and to order your FREE Security Tool Kit, ...
    (microsoft.public.sqlserver.security)
  • Re: Trying to get a SSIS Import wizard package to actually schedule and work.
    ... Microsoft Global Technical Support Center ... |> would like to explain that we are allowed to re-use the SSIS package ... We use this task to transfer the SQL Server ... |> Objects Task" for your reference. ...
    (microsoft.public.sqlserver.dts)
  • Re: DTS packet size
    ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. ... >I have a dts package that transfers data from a view into> a table structure on another server. ... > Check your network documentation. ...
    (microsoft.public.sqlserver.dts)
  • Re: DTS package fails intermittently while loading a large amount of d
    ... mentions that there is a network error I would suspect that the box on which ... the package is running loses communication with one of the connections in ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) ...
    (microsoft.public.sqlserver.dts)
  • SqlDataSource: No valid declarative parameter value for a datetime?
    ... "by design" as Microsoft says. ... object itself is added to the Command's parameter collection and it formats ... format of the date sent to the SQL server, type the parameter as a string ... So I assume that I'd have to change to using the type as a string. ...
    (microsoft.public.dotnet.framework.aspnet)