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 7074335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:02:33+00:00 2026-05-28T06:02:33+00:00

I found this piece of code which works fine for my input (a string

  • 0

I found this piece of code which works fine for my input (a string of CSV). The package runs fine, but instead of getting 5 columns of output, I only get 2 columns. I added additional columns in the Script Component and also changed their data types to the suitable ones. The input is 643492,PV STRIP 1X1 UTILITY UP,,67.5,393446. Out of this entire string, I only get 643492 in one column and PV STRIP 1X1 UTILITY UP in another. Rest of the string comes out blank no idea why. Experts kindly help. I dont know anything about .net and I am new to SQL Server as well.

Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
    Dim strRow As String
    Dim strColSeperator As String
    Dim rowValues As String()
    strRow = Row.Line.ToString()
    If strRow.Contains(",") Then
        strColSeperator = (",")
    ElseIf strRow.Contains(";") Then
        strColSeperator = ";"
    End If

    rowValues = Row.Line.Split(CChar(strColSeperator))
    Row.Code = rowValues.GetValue(0).ToString()
    Row.Description = rowValues.GetValue(1).ToString()

End Sub
  • 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-05-28T06:02:33+00:00Added an answer on May 28, 2026 at 6:02 am

    It appears that you are only assigning the first two values to the buffer row. The last two lines of your code snippet is where the assignment is being made. Your rowValues array should contain 5 values based the Split() on the string you provided in your example. You can assign them using the GetValue(index) method. Do this for indexes 3 through 5 of your array.

    The string values go like above:

    Row.FieldName = rowValues.GetValue(0).ToString()
    

    where Code is the name of the field and 0 is the zero-based index of the value in the array.

    For an integer, you can do something like:

    Row.FieldName = Convert.ToInt32(rowValues.GetValue(3))
    

    You can use other Convert methods to convert to your desired output type. See MSDN for reference.

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

Sidebar

Related Questions

I found this piece of code which seems pretty cool. I see return new
I've found this piece of code on Koders : private ServiceProvider SiteServiceProvider { get
We have the following piece of code (idea for this code was found on
I have found the following piece of code which uses XmlHttpRequest to read JSON
('1' * N) !~ /^1?$|^(11+?)\1+$/ On the net, I found this piece of Ruby
Found this: Sub SurroundWithAppendTag() DTE.ActiveDocument.Selection.Text = .Append( + DTE.ActiveDocument.Selection.Text + ) End Sub But
Reading this question I found this as (note the quotation marks) code to solve
I found this link http://artis.imag.fr/~Xavier.Decoret/resources/glsl-mode/ , but there isn't a lot of description around
I found this in an article on Multithreaded Apartments, but can’t find a definition
I have this little piece of code that just checks for a particular text

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.