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

  • SEARCH
  • Home
  • 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 7172275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:35:01+00:00 2026-05-28T15:35:01+00:00

I have the following piece of code which works fine and does what it

  • 0

I have the following piece of code which works fine and does what it is intended for. But my source data has a line added to the very bottom and it makes this thing break. When I go and delete that last line, this code works fine. I dont want manually modify the file everyday this script runs. Following is the code. Is there any way I can ignore the last line of my input and process the rest of it. I know its a simple conditional if-else, but I dont have any clue about .net and someone else helped me write this code. Thanks in advance.

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()
    Row.Blank = rowValues.GetValue(2).ToString()
    Row.Weight = rowValues.GetValue(3).ToString()
    Row.Scan = rowValues.GetValue(4).ToString()

End Sub

Sample input data: 643492,PV STRIP 1X1 UTILITY UP,,56,393454
Last line of the input file: “EndDb”

  • 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-28T15:35:02+00:00Added an answer on May 28, 2026 at 3:35 pm

    Something like this should do the trick:

    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))
        If (rowValues.Length > 1) Then
        Row.Code = rowValues.GetValue(0).ToString()
        Row.Description = rowValues.GetValue(1).ToString()
        Row.Blank = rowValues.GetValue(2).ToString()
        Row.Weight = rowValues.GetValue(3).ToString()
        Row.Scan = rowValues.GetValue(4).ToString()
        End If
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following piece of code which outputs a long article: <?php the_content();
I have the following piece of code which play the flv file, <embed align=middle
I have the following piece of code which calls a few different subs: Sub
I have a piece of code which works in a way that is unexpected
I have the following piece of code which is not running as I expected:
I have this piece of code which compiles and works as expected: #include <iostream>
I have this following piece of code, which loads UIWebView properly on one Wifi
I have the following piece of code, which doesn't work: <?php class test{ public
I have the following piece of code which uses the ALAssets library to store
I have following piece of code which tries to load an XML file from

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.