Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. reading text file seperated by Pipes

reading text file seperated by Pipes

Scheduled Pinned Locked Moved C#
database
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DownBySpj
    wrote on last edited by
    #1

    hi to all, I have to read a file that contains records seperated by commas. Each records in a row may contain different different number of fields. I have to check whether the particular row contains all the necessary records by using the first column of each record. The first column of each row contains the key which is to be used to fetch the data from the database about the columns info of the records. thanx in advance

    B S 2 Replies Last reply
    0
    • D DownBySpj

      hi to all, I have to read a file that contains records seperated by commas. Each records in a row may contain different different number of fields. I have to check whether the particular row contains all the necessary records by using the first column of each record. The first column of each row contains the key which is to be used to fetch the data from the database about the columns info of the records. thanx in advance

      B Offline
      B Offline
      Bhupi Bhai
      wrote on last edited by
      #2

      Hey.. looks like this is your class assignment !! Dude, do some reading & RND. Regards, Bhupi Bhai.

      D 1 Reply Last reply
      0
      • B Bhupi Bhai

        Hey.. looks like this is your class assignment !! Dude, do some reading & RND. Regards, Bhupi Bhai.

        D Offline
        D Offline
        DownBySpj
        wrote on last edited by
        #3

        Noops yaar. i m stuck with this becuse i m stuck in this and is unable to think the way i should proceed. if u can help. i have to implement this and it is very urgent..

        1 Reply Last reply
        0
        • D DownBySpj

          hi to all, I have to read a file that contains records seperated by commas. Each records in a row may contain different different number of fields. I have to check whether the particular row contains all the necessary records by using the first column of each record. The first column of each row contains the key which is to be used to fetch the data from the database about the columns info of the records. thanx in advance

          S Offline
          S Offline
          Stefan Troschuetz
          wrote on last edited by
          #4

          You can use StreamReader.ReadLine to read information in the file line by line and String.Split to seperate the records.


          "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

          www.troschuetz.de

          A 1 Reply Last reply
          0
          • S Stefan Troschuetz

            You can use StreamReader.ReadLine to read information in the file line by line and String.Split to seperate the records.


            "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

            www.troschuetz.de

            A Offline
            A Offline
            Andrew Rissing
            wrote on last edited by
            #5

            http://www.codeproject.com/cs/database/GenericParser.asp[^] or http://www.codeproject.com/cs/database/CsvReader.asp[^] Once you've parsed the row, you just need to interpret the data within the row as needed. I hope that helps :-).

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups