How to read txt file and open DataBase
-
Heloo, How can i read a specific txt file and open a new 'mdb' file that will contain some things that the file has. For instance, The File contains: 00000 33333 22222 11111 ID=32 Name=Fox DATE=040208 33333 33333 33333 33333 Number=45 Add=LA Cell=12345678 22222 11111 22222 11111 ID=12 Name=LOLA DATE=020207 and so on.... i want to create a new mdb file that will contain a specific columns (ID,NAME,DATE,NUMBER,ADD,CELL).. i want that the comp will read the file and ignore the numbers(on the first line,on the third line and on the fifth line) and the comp will add a new line for the mdb file(for example: gil.mdb) it will very help me.. it is for my HUGE project.. thank you very much..
-
Heloo, How can i read a specific txt file and open a new 'mdb' file that will contain some things that the file has. For instance, The File contains: 00000 33333 22222 11111 ID=32 Name=Fox DATE=040208 33333 33333 33333 33333 Number=45 Add=LA Cell=12345678 22222 11111 22222 11111 ID=12 Name=LOLA DATE=020207 and so on.... i want to create a new mdb file that will contain a specific columns (ID,NAME,DATE,NUMBER,ADD,CELL).. i want that the comp will read the file and ignore the numbers(on the first line,on the third line and on the fifth line) and the comp will add a new line for the mdb file(for example: gil.mdb) it will very help me.. it is for my HUGE project.. thank you very much..
System.IO.StreamReader sr = new System.IO.StreamReader("c:\\1.txt");
String Line = sr.ReadLine();And Look for String.Split to split string to array based on entry. And using String.Substring to get specific chars of specific lenght. You need to manualy create parser to intercept and convert it to your DB writer