sql = " insert into plankDetail3L (批号,明细号,材料名,高,宽,厚,块数) values(""" +
strOrderId + """," +
dataGridView3.Rows[i].Cells[1].Value + ",""" +
dataGridView3.Rows[i].Cells[2].Value + """," +
Convert.ToInt32(dataGridView3.Rows[i].Cells[3].Value) + intHeight + "," +
Convert.ToInt32(dataGridView3.Rows[i].Cells[4].Value) + intWidth + "," +
Convert.ToInt32(dataGridView3.Rows[i].Cells[5].Value) + intDeep + "," +
Convert.ToInt32(dataGridView3.Rows[i].Cells[6].Value) + ")";
OBJcmdUpdate3 = new OleDbCommand(sql, sqlConn);
OBJcmdUpdate3.ExecuteNonQuery();
|
|
Convert.ToInt32
|
|
40分 |
(Convert.ToInt32(dataGridView3.Rows[i].Cells[4].Value) + intWidth)
用括号包含下 |
楼上的对,没注意啊
|
|
用Convert.toint32(要转换的内容)这个方法
|