Click here to Skip to main content
15,898,747 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My requirement is I want to browse the file with extension .DAT(test.DAT) file in my MVC4 application, where the user can select the file. There is a Same columns in both my database table as well as in the .DAT(test.DAT) file. Before importing the data in the table of the database the Columns present in the .DAT(test.DAT) file should be compared with the Columns in the database.
1)Selecting The .DAT(test.DAT)file with data Columns and Rows same as Table designed in .DAT(test.DAT) file rows and Columns.
2)All rows and Columns like in .DAT(test.DAT) file Table also designed with same fromat in SQL Server Database in a same format.

3)When I upload this .DAT file file i need to Save the .DAT file data into Data base tables same as in .DAT file Using MVC4

This is data of .DAT file
test.dat file data
1 528 Q25E test2 10-02-13 10.5789
2 587 Q26F Adta 11-05-14 14.25789

Should Be save in database like this
Table designed like this
Id EmpID Code Name Date Amount
1 528 Q25E test2 10-02-13 10.5789
2 587 Q26F Adta 11-05-14 14.25789

Posted
Updated 18-Feb-14 22:48pm
v2

1 solution

This will give you a general idea. From your description your file is not CSV but tab delimited.

Link
 
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