convert delimited text file into database file using 2005 C#
-
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: :((
-
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: :((
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.
-
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: :((
-
Some databases support this operation. You should consult your database documentation. In SQL Server they have Bulk Insert[^]
led mike
That mean i need to create a table? sorry i am new in C# programming
-
Some databases support this operation. You should consult your database documentation. In SQL Server they have Bulk Insert[^]
led mike
Hook up!!!
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Hook up!!!
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Hmm. Getting replies today that I just don't understand. Guess I picked a bad day to stop smoking crack.
led mike
:-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:
-
:-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: