![]() |
#2
Maick2015-07-27 11:57
|
之前通过如下代码能成功执行
string sql = "select count(*) as result from table where FBarCode='" + barcode + "' and FCategory='" + lbie + "'";
int res = SQLSERVERUtil.GetRecordCount(sql);
if (res < 1) //数据不存在
{
labNotice.Text = "该数据不存在";
temp_del = false;
}
那么我用下面的代码,怎么把ID赋值给变量
string sql = "select id from table where FBarCode='" + barcode + "' and FCategory='" + lbie + "'and FUpdate=1";
谢谢了