如何将csv文件中的1crore记录加载到vb.net中的数据表中? [英] how to load the 1crore records from the csv file to the datatable in vb.net?

查看:136
本文介绍了如何将csv文件中的1crore记录加载到vb.net中的数据表中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,
有人告诉我一种有效的方式来加载具有超过1千万记录的csv文件.也就是说,文件大小超过285MB.我已经尝试过oledb方法,但是出现了内存不足异常.请帮我做.

问候,
Sathish

Dear All,
Anyone tell me the efficient way to load the csv file which having more than 1 crore records. ie., the size of the file is more than 285MB. I''ve tried with oledb method, but i got Out of memory exception. Please help me to do this.

Regards,
Sathish

推荐答案

如果我是我,我将使用StreamReader,一次读取一行文件,然后将数据保存到数据库中.

希望对您有帮助
If I were you I would use a StreamReader, and read the file one line at a time, saving the data to a database as I went.

Hope this helps


这篇关于如何将csv文件中的1crore记录加载到vb.net中的数据表中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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