在Excel.netExcel工作表数据加载到SQL Server#
it1352
帮助1人
问题说明
尝试在ASP中使用C#将数据从excel导入到SQL Server。净。我必须提供客户端选项来浏览和上传Excel文件数据到Sql server表。我没有生产Web服务器的写权限,其中应用程序将托管在IIS服务器上。所以,我不能使用FileUpload,其中excel表将首先保存在Server Path中,然后使用BulkReader。请告诉我任何替代方法来实现这一点。谢谢!
Am trying to Import Data from excel to Sql server using C# in ASP. NET. I have to give client side options to browse and upload excel file data to Sql server tables.I don't have write permission on Production Web Server, where the Application will be hosted on IIS Server. So, I cannot use FileUpload where excel sheet will be first saved in in Server Path and then use BulkReader.Please suggest me any alternative way to achieve this. Thanks!
正确答案
#1
没有批量上传的更慢的解决方案 - 循环数据,构建插入查询和插入数据。
Slower solution without bulk upload - loop through data, build insert queries and insert data.
存储数据到来自excel的数据表然后使用批量插入上传到sqlserver。
点击链接:
http://jubayerdevs.blogspot.hk/2013/10/store-excel-data-to-datatable-and-copy.html [ ^ ]
store data to datatable from excel then upload to sqlserver using bulk insert.
follow the link:
http://jubayerdevs.blogspot.hk/2013/10/store-excel-data-to-datatable-and-copy.html[^]
在这里阅读:
http://technet.microsoft.com/en-us/library/ms345167.aspx [ ^ ]
和这里:
http://blogs.msdn.com/b/mattm/archive/2008/12/30/samples-for-creating-ssis-packages-programmatically.aspx [ ^ ]
Read here:
http://technet.microsoft.com/en-us/library/ms345167.aspx[^]
and here:
http://blogs.msdn.com/b/mattm/archive/2008/12/30/samples-for-creating-ssis-packages-programmatically.aspx[^]
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /reply/detail/tanhcfgchi
系列文章
更多
同类精品
更多
-
YouTube API 不能在 iOS (iPhone/iPad) 工作,但在桌面浏览器工作正常?
it1352 07-30 -
iPhone,一张图像叠加到另一张图像上以创建要保存的新图像?(水印)
it1352 07-17 -
保持在后台运行的 iPhone 应用程序完全可操作
it1352 07-25 -
使用 iPhone 进行移动设备管理
it1352 07-23 -
在android同时打开手电筒和前置摄像头
it1352 09-28 -
检查邮件是否发送成功
it1352 07-25 -
扫描 NFC 标签时是否可以启动应用程序?
it1352 08-02 -
Android微调工具-删除当前选择
it1352 06-20 -
Android App 和三星 Galaxy S4 不兼容
it1352 07-20 -
希伯来语的空格句子标记化错误
it1352 06-22