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. convert delimited text file into database file using 2005 C#

convert delimited text file into database file using 2005 C#

Scheduled Pinned Locked Moved C#
databasehelpcsharp
8 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.
  • Y Offline
    Y Offline
    yefeng_law
    wrote on last edited by
    #1

    Hi all, I need help in converting a delimited text file as follow into a database file so that i could use sql commend to select and view the column that i wants to view. but i am stuck in converting the file pls help, i am using 2005 C# for my programming. My delimited text file: Time Locked CBER Quality VBER Strength SNR Uncorrectable 03:08:45.655 T 1.0E-003 64 1.6E-003 -17 18 1143 .655 col start @ 1st tab Locked col start @ 2nd tab CBER col start @ 3th tab Quality col start @ 5th tab VBER col start @ 7th tab Strength col start @ 9th tab SNR col start @ 11th tab Uncorrectable col start @ 12th tab the tab mean the delimited spacing of each column within a row. Pls direct me if i m wrong, what i need is to convert this file into a database file for better storing and selection to view the col of info i want thanks. :confused: :((

    S L 2 Replies Last reply
    0
    • Y yefeng_law

      Hi all, I need help in converting a delimited text file as follow into a database file so that i could use sql commend to select and view the column that i wants to view. but i am stuck in converting the file pls help, i am using 2005 C# for my programming. My delimited text file: Time Locked CBER Quality VBER Strength SNR Uncorrectable 03:08:45.655 T 1.0E-003 64 1.6E-003 -17 18 1143 .655 col start @ 1st tab Locked col start @ 2nd tab CBER col start @ 3th tab Quality col start @ 5th tab VBER col start @ 7th tab Strength col start @ 9th tab SNR col start @ 11th tab Uncorrectable col start @ 12th tab the tab mean the delimited spacing of each column within a row. Pls direct me if i m wrong, what i need is to convert this file into a database file for better storing and selection to view the col of info i want thanks. :confused: :((

      S Offline
      S Offline
      SeMartens
      wrote on last edited by
      #2

      Hi, so you already made half of the way. If you know the format of the file, so what's left is: 1) Read the file line by line. 2) Split each line (could be done with line.Split('\t')) to get an array corresponding to your columns. 3) Put the values in a sql command and execute it. Oh missed point 0) Set up the database. Regards, Sebastian

      It's not a bug, it's a feature! Me in Softwareland.

      1 Reply Last reply
      0
      • Y yefeng_law

        Hi all, I need help in converting a delimited text file as follow into a database file so that i could use sql commend to select and view the column that i wants to view. but i am stuck in converting the file pls help, i am using 2005 C# for my programming. My delimited text file: Time Locked CBER Quality VBER Strength SNR Uncorrectable 03:08:45.655 T 1.0E-003 64 1.6E-003 -17 18 1143 .655 col start @ 1st tab Locked col start @ 2nd tab CBER col start @ 3th tab Quality col start @ 5th tab VBER col start @ 7th tab Strength col start @ 9th tab SNR col start @ 11th tab Uncorrectable col start @ 12th tab the tab mean the delimited spacing of each column within a row. Pls direct me if i m wrong, what i need is to convert this file into a database file for better storing and selection to view the col of info i want thanks. :confused: :((

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        Some databases support this operation. You should consult your database documentation. In SQL Server they have Bulk Insert[^]

        led mike

        Y M 2 Replies Last reply
        0
        • L led mike

          Some databases support this operation. You should consult your database documentation. In SQL Server they have Bulk Insert[^]

          led mike

          Y Offline
          Y Offline
          yefeng_law
          wrote on last edited by
          #4

          That mean i need to create a table? sorry i am new in C# programming

          1 Reply Last reply
          0
          • L led mike

            Some databases support this operation. You should consult your database documentation. In SQL Server they have Bulk Insert[^]

            led mike

            M Offline
            M Offline
            Mark Salsbery
            wrote on last edited by
            #5

            Hook up!!!

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            L 1 Reply Last reply
            0
            • M Mark Salsbery

              Hook up!!!

              Mark Salsbery Microsoft MVP - Visual C++ :java:

              L Offline
              L Offline
              led mike
              wrote on last edited by
              #6

              Hmm. Getting replies today that I just don't understand. Guess I picked a bad day to stop smoking crack.

              led mike

              M 1 Reply Last reply
              0
              • L led mike

                Hmm. Getting replies today that I just don't understand. Guess I picked a bad day to stop smoking crack.

                led mike

                M Offline
                M Offline
                Mark Salsbery
                wrote on last edited by
                #7

                :-D We've discussed this before...."Hook up!" is yelled when a big game fish (tuna, yellowtail, wahoo, etc.) grabs a lure while trolling from a sportfishing boat. Judging by the OP's reply above, you've been hooked ;P

                Mark Salsbery Microsoft MVP - Visual C++ :java:

                L 1 Reply Last reply
                0
                • M Mark Salsbery

                  :-D We've discussed this before...."Hook up!" is yelled when a big game fish (tuna, yellowtail, wahoo, etc.) grabs a lure while trolling from a sportfishing boat. Judging by the OP's reply above, you've been hooked ;P

                  Mark Salsbery Microsoft MVP - Visual C++ :java:

                  L Offline
                  L Offline
                  led mike
                  wrote on last edited by
                  #8

                  Mark Salsbery wrote:

                  We've discussed this before...."Hook up!"

                  Ah yes, now I remember. At least now I understand your reply. ;)

                  led mike

                  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