Click here to Skip to main content
15,789,698 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am creating a utility in which reading data from text file and iinserting in access table

Following is the actual data in text file

But after imported in ms acess getiing only col1 numeric values
Col1	Col2	Col3	Col4	Col5
10317288		A	0	0
10601329		A	20120424	20121031
		A	20060518	99991231
		A	20060331	99991231

Connection String is as follow
String ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + dbPath;

And insert query is as follow.
DataTable dtTblQry = openAccessDB("delete from " + strTblName);
                strSql = "insert into " + strTblName + " select " + strFields + " from ";
                strSql += "[Text;IMEX=1;HDR=YES;DATABASE=" + System.Windows.Forms.Application.StartupPath + "\\DATA\\" + ";]";
                strSql += ".";
                strSql += "[" + strTblName + ".txt]";
                dtTblQry = openAccessDB(strSql);

Please help me to resolve this issue!!
Thanks in Advance
Updated 18-Oct-12 9:44am

1 solution

Question is unclear since it appears from the formatted (poorly) database results that there is in fact more than one number.

However I do note that the two missing values are not "numeric" values.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900