Help: TXT file into the Oracle database

The existing TXT files, such as d:\dm.txt
The two field (column two)

How to import existing Oracle database tables?
Through the DataTable?
How to read txt files datatable?
Seek help

Started by Otto at November 20, 2016 - 8:04 AM

Txt file data should be regularly, you can use the StreamReader object to a line of the reading, and then a row is added to the DataTable.

Posted by Randall at December 04, 2016 - 8:54 AM

The response to 2013-11-04 10:01:26 was removed by the administrator

Posted by Lydia at December 05, 2016 - 8:57 AM

The text is as follows
The first second columns
1 Zhang San
2 Li Si
Between the columns tab delimited
I used the following method
DataTable dt = new DataTable();
                dt.Columns.Add("key", typeof(String));
                dt.Columns.Add("pass", typeof(String));
                DataRow dr = null;
                string[] items = File.ReadAllLines(@"D:\p.txt");//You read a text fileļ¼

                foreach (string item in items)
                    dr = dt.NewRow();
                    dr["key"] = items[0].ToString();

                    dr["pass"] = items[1];


Get is, key takes a line, a line of pass,

Posted by Otto at December 19, 2016 - 9:22 AM