开发者

Insert multiple DB rows from listview - VB.NET MYSQL

I have a listview that can contain up to roughly 2,000 listview items I need to loop through the listview and insert each item into a mysql database

is there a better, bulk way, to insert the data instead of doing an insert for each item like follows:

for eac开发者_如何学JAVAh itm ...
  insert into whatever ( id ) values ( itm.text ) ...
next

Thanks


You could build up a file containing the changes and then use the 'LOAD DATA INFILE' functionality -

http://dev.mysql.com/doc/refman/5.0/en/load-data.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜