Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8062413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:39:38+00:00 2026-06-05T10:39:38+00:00

My current package consists of an Excel Source, a Script component, and an OLE

  • 0

My current package consists of an Excel Source, a Script component, and an OLE DB destination. All I am trying to accomplish is to transform one of my columns. For this specific column I want a substring of the column. However, I keep getting the following error message:

 There is no current row in the buffer. A row may need to be added using the AddRow method.
 at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)

What does that mean? Why would I need to Add Rows when all I am doing is transforming data? Am I missing the big picture about SSIS?

Here is my code in the script:

    public override void Input0_ProcessInputRow(Input0Buffer Row)
    {
        OutBuffer.labortypewbs = Row.CopyofLevel2ProjectSegment.Substring(Row.CopyofLevel2ProjectSegment.Length - 2, 2);
    }

Thanks for all the help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T10:39:40+00:00Added an answer on June 5, 2026 at 10:39 am

    Why don’t you use a derived column rather than a script component. You can add a column that is a substring of an existing column trivially with that component, and you don’t have to write any code or learn the intricacies of script component programming. I would only use a script component if:

    1. I had a case where there was no existing component to do the transformation I wanted.
    2. The component I needed to use was not fast enough or accurate enough (with proof) to use.

    I have had a few edge cases where a script component was the best solution, but they are few and far between, and a substring is not one of those cases.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a Python application; it has all its code in one package and
In the current package that I am working on for a project I have
I have an NAnt task ship to package my current .sql scripts into a
My current requirement is: I have to package my grails app and use teamcity
I have found this piece of code in the Haskell sendfile package: http://patch-tag.com/r/mae/sendfile/snapshot/current/content/pretty/src/Network/Socket/SendFile/Linux.hsc --
I'm trying to create an xpi package for a firefox addon through cfx tool.
Our current web application url reveals the class package structure to the end user.
I have some classes in my current project which have the wrong package declaration
All, I have the following Package Description: CREATE OR REPLACE PACKAGE ashish.PKG_Customer AUTHID CURRENT_USER
How could I access the symbol table for the current package an object was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.