1 528 Q25E test2 10-02-13 10.5789 2 587 Q26F Adta 11-05-14 14.25789 应该像这样保存在数据库中 像这样设计的表 Id EmpID代码名称日期金额 1 528 Q25E test2 10-02-13 10.5789 2 587 Q26F Adta 11-05-14 14.25789 解决方案 这将给出你一般的想法。根据您的描述,您的文件不是CSV,而是以制表符分隔。 Link 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 MVC4This is data of .DAT filetest.dat file data1 528 Q25E test2 10-02-13 10.57892 587 Q26F Adta 11-05-14 14.25789Should Be save in database like thisTable designed like thisId EmpID Code Name Date Amount1 528 Q25E test2 10-02-13 10.57892 587 Q26F Adta 11-05-14 14.25789 解决方案 This will give you a general idea. From your description your file is not CSV but tab delimited.Link 这篇关于如何将数据从.dat文件导入到MVC中的SQL Server中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-23 22:34