简体   繁体   English

在C#中使用Visual Studio 2010进行批量插入

[英]Bulk insertion using Visual Studio 2010 in C#

I have a dictionary database in a C# project that contain large amount of words and their meanings. 我在C#项目中有一个词典数据库,其中包含大量的单词及其含义。 My database has a table named "dic", that have 2 columns: first is "english" (the one which contains the English word) and the second is "bangla" (which contains the meaning). 我的数据库有一个名为“ dic”的表,该表有2列:第一个是“ english”(一个包含英语单词),第二个是“ bangla”(包含含义)。 I have 2 text files: english.txt containing 20000 words and bangla.txt containing their meanings. 我有2个文本文件: english.txt包含20000个单词, bangla.txt包含其含义。 i tried put the query on visual stdio 2010 like : 我尝试将查询放在视觉stdio 2010上,例如:

BULK INSERT dic FROM 'C:\Users\Imon-Bayazid\Desktop\wordddd\good one\list.txt' 
WITH (  FIELDTERMINATOR = ',', ROWTERMINATOR = '\n' )

But it didnt work.shows the error "The BULK INSERT SQL construct or statement is not supported"; 但是它没有用。显示错误“不支持BULK INSERT SQL构造或语句”; How can I insert these words and their meaning into the "dic" table from the two txt files using bulk insertion of MS SQL? 如何使用批量插入MS SQL将这些单词及其含义从两个txt文件插入“ dic”表中? can anyone tell me details about this ?? 谁能告诉我有关此的详细信息?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM