jj,
You might want to consider using the Data Transformation Services. This
will allow you to specify different formats to convert data from/to which
should make the task very easy.
Here are some links to some resources which should help you out:
http://msdn.microsoft.com/library/de...basic_5zg3.asp http://www.sqldts.com/
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"jj" <jj@hotmail.com> wrote in message
news:eF**************@TK2MSFTNGP11.phx.gbl...
I have this comma delimited text file. I want to convert it in one sweep
to
an access DB (mdb) format. I used the following code but it takes forever
to
convert. Is there a faster way?
string strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
strAppPath + "\\mydb.mdb";
OleDbConnection conn = new OleDbConnection(strConn);
conn.Open();
OleDbCommand cmd = new OleDbCommand();
cmd = new OleDbCommand("INSERT INTO mytable Select * from
[Text;DATABASE="
+ strAppPath + ";].[mytextdata.txt]",conn );
cmd.ExecuteNonQuery();
conn.Close();
Any help is greatly appreicated and thank you in advance.