C#-有没有一种方法可以将csv文件流式传输到数据库中? [英] C# - is there a way to stream a csv file into database?

查看:117
本文介绍了C#-有没有一种方法可以将csv文件流式传输到数据库中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到很多文章都在谈论使用SqlBulkCopy将内容从csv复制到数据库中,
,但是它们都需要将数据加载到数据表或数据集中。

I saw lots of articles talking about using SqlBulkCopy to copy content from csv into database, but they all need to load the data into a data table or data set.

这对我没有好处,因为我处理大量数据,并且我没有强大的机器。

this is no good for me, since i deal with large amount of data, and i dont have powerful machine.

是否有一种流数据的方法从CSV导入数据库?

is there a way to stream data from the csv into database?

谢谢

推荐答案

显示如何不使用临时数据表/数据集直接将数据加载到数据库。

This article does show how to load the data directly to the database, without using a temp data table/ data set.

C#-CSV导入导出

只需查找方法直接保存到数据库

这篇关于C#-有没有一种方法可以将csv文件流式传输到数据库中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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