111,129
社区成员
发帖
与我相关
我的任务
分享
private Server.ServiceClient FServer = new Server.ServiceClient();
private void imp()
try
{
for (int i = 0; i < 10000; i++)
{
FServer.WCustom_Import(i);
}
} catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
public void WCustom_Import(int wm)
{
try
{
//连接数据库方法省略 实例化对象名称是db
//SQL语句就是
string sqlstr="insert into test(id) values("+wm+")";
db.ExecuteNonQuery(sqlstr);
return;
} catch (Exception ex)
{
throw new FaultException(ex.Message);
}
}