Myo,
Assuming you want to just add records from the text file to the data
set, what you could do is first create the data set in such a way that it
matches the schema of your database table.
Once you do that, you can create new rows in your data table, the values
of which you get from parsing your text file (or, if you are lucky and it is
a delimited file of some kind, you use the data provider for text in OLE DB
through the System.Data.OleDb namespace).
Once you have your data table populated, you can create a data adapter
which has the InsertCommand set to a command which will insert the new
records. You then pass the data set to the adapter, and the rows should be
in your table.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Myo Zaw" <in********@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
hi,
can i update/insert my database by reading the data from text file
with dataset. or if you have a better and faster way please share me.
cause my database has more than two million records and text file has more
than 20,000 lines. :(
thanks in advance,
myo zaw