Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS on SQL Server 2008R2 "The value is too large to fit in the column data area of the buffer."


SSIS on SQL Server 2008R2 "The value is too large to fit in the column data area of the buffer."

Author
Message
gbritton1
gbritton1
Old Hand
Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)

Group: General Forum Members
Points: 369 Visits: 840
Koen Verbeeck (7/29/2014)
Is it possible to post the .NET code?


Sure! Though note that the DataFLow task fails just before this code begins to execute:


/* Microsoft SQL Server Integration Services Script Component
* Write scripts using Microsoft Visual C# 2008.
* ScriptMain is the entry point class of the script.*/

using System;
using System.Data;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;

[Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
public class ScriptMain : UserComponent
{

public override void PreExecute()
{
base.PreExecute();
/*
Add your code here for preprocessing or remove if not needed
*/
}

public override void PostExecute()
{
base.PostExecute();
/*
Add your code here for postprocessing or remove if not needed
You can set read/write variables here, for example:
Variables.MyIntVar = 100
*/
}

public override void Input0_ProcessInputRow(Input0Buffer Row)
{
const int MinExpectedNumberOfFields = 2;
const int MaxExpectedNumberOfFields = 3;
string[] values = Row.Data.Split(new char[] { '\t' }, MaxExpectedNumberOfFields);
// Check that correct number of values received
if (values.Length < MinExpectedNumberOfFields || values.Length > MaxExpectedNumberOfFields)
{
bool pbCancel = false;
this.ComponentMetaData.FireError(100,
"Process Detail Row",
String.Format("Incorrect number of fields. Expected: {0} to {1}, received: {2}",
MinExpectedNumberOfFields,
MaxExpectedNumberOfFields,
values.Length),
"No Help Available", 0, out pbCancel);
return;
}

Row.ErrorCode = values[0];
Row.ErrorMessage = values[1];
Row.LoggingActivityRecord = values.Length >= 3 ? values[2] : null;
}

}



Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16471 Visits: 13207
Instead of the console line, try a message box perhaps?
Does everything work if you get rid of the script component?



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
gbritton1
gbritton1
Old Hand
Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)Old Hand (369 reputation)

Group: General Forum Members
Points: 369 Visits: 840
Koen Verbeeck (7/29/2014)
Instead of the console line, try a message box perhaps?
Does everything work if you get rid of the script component?


I added calls to MessageBox before each statement in the script source. This finally exposed the problem:

I had been focused on the Data column, since that is what was increased. However, the sample data included the ErrorMessage column as well (See the source from the previous post). This column (not the data column) has now exceeded the specifications.

Koen, zonder uw hulp had ik deze fout helemaal gemissed!

Hartelijk bedankt!!
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16471 Visits: 13207
gbritton1 (7/29/2014)
Koen Verbeeck (7/29/2014)
Instead of the console line, try a message box perhaps?
Does everything work if you get rid of the script component?


I added calls to MessageBox before each statement in the script source. This finally exposed the problem:

I had been focused on the Data column, since that is what was increased. However, the sample data included the ErrorMessage column as well (See the source from the previous post). This column (not the data column) has now exceeded the specifications.

Koen, zonder uw hulp had ik deze fout helemaal gemissed!

Hartelijk bedankt!!


Glad you found the issue :-D



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search