By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,163 Members | 1,332 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,163 IT Pros & Developers. It's quick & easy.

convert text to access mdb

P: n/a
jj
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.

Feb 6 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
jj,

Post this message crossposted in the newsgroups

microsoft.public.dotnet.languages.vb.data
and
microsoft public.dotnet.framework.adonet

In those is Paul Clement active (is he here as well, however in that there
is less change that he missed it). This is typical a question for him. I
don't try even anymore these ones.

Cor
Feb 7 '06 #2

P: n/a
On Tue, 7 Feb 2006 07:45:17 +0100, "Cor Ligthert [MVP]" <no************@planet.nl> wrote:

jj,

Post this message crossposted in the newsgroups

microsoft.public.dotnet.languages.vb.data
and
microsoft public.dotnet.framework.adonet

In those is Paul Clement active (is he here as well, however in that there
is less change that he missed it). This is typical a question for him. I
don't try even anymore these ones.

Cor,

I already responded in one of the cross-posted groups.
Paul
~~~~
Microsoft MVP (Visual Basic)
Feb 9 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.