自动将.csv文件上传到数据库 [英] upload .csv files to Database automatically

查看:131
本文介绍了自动将.csv文件上传到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想在前端接受.CSV文件(在文件上载控件中),如果我单击上载"按钮(按钮控件),则上载的CSV文件将被保存为数据库,并以原子形式列在创建的表中在数据库中.如

table_name =上传的文件名
文件的第一行=数据库中表的自动列.


请有人在这方面帮助我.提供完整的编程代码,就像我使用Microsoft Visual Studio 2010和SQL Server 2008一样.

i want to Accept only .CSV files in front end (in file upload control) and if i click "Upload" button(button control) the uploaded CSV file will be saved in Database as created table with column''s atomatically in Database. as

table_name=uploaded file_name
first row of the file= column''s of the table in Database automatically.


please some one help me in this regard''s. give full programming code as i am using Microsoft Visual Studio 2010 and SQL Server 2008.

推荐答案



请检查以下链接.

http://amitpatriwala.wordpress.com/2008/08 /27/upload-csv-file-and-read-using-aspnet/ [
Hi,

Please check into the below link.

http://amitpatriwala.wordpress.com/2008/08/27/upload-csv-file-and-read-using-aspnet/[^]

Here you just need to add some code to save data into database.


这篇关于自动将.csv文件上传到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆