问题字符串处理 [英] problem string processing

查看:90
本文介绍了问题字符串处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码如下:

I have a code below:

for (int i = 0; i < 100000; i++)
           {
sql += "Begin tran t1 insert into LUONGKHOAN(MaLuongKhoan) values("+i +") commit tran t1 ";
}



当我完成时,全部45个。如何加快处理速度。谢谢分享社区。

推荐答案

你的代码不完整,所以我不知道这一点 - 但是,我想你可能正在调用一个接一个地插入数据库。

尝试只发送一次请求 - 这将节省大量时间在网络上来回插入数据/
Your code is not complete , so I don''t know this - however, I think you might be making a call to insert to the database one by one.
Try to send the request just once - this will save a lot of time going back and forth over the network to insert data/


否。我只是这样做,而不是添加到数据库。
No no. I just do it, not to add to the database.


这篇关于问题字符串处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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