我正在创建一个查询,我似乎无法超越Not all variables bound
Oracle 中的错误
据我所知,一切看起来都是正确的。我错过了什么?
为了保护无辜者,代码有点模糊......
OracleCommand execCmd = new OracleCommand();
OracleParameter outParam =
new OracleParameter("ID", OracleType.Int32);
outParam.Value = DBNull.Value;
outParam.Direction = System.Data.ParameterDirection.Output;
execCmd.CommandText = "insert into o " +
"(A, B, " +
"C, D, E, " +
"F, G, H, I, " +
"J, K) " +
"VALUES (:A, :B, :C, :D, :E, " +
":F, :G, :H, :I, :J, :K) " +
"RETURNING O_ID INTO :ID";
execCmd.Parameters.AddWithValue("A", og.N);
execCmd.Parameters.AddWithValue("B", DBNull.Value);
execCmd.Parameters.AddWithValue("C", DBNull.Value);
execCmd.Parameters.AddWithValue("D", og.A);
execCmd.Parameters.AddWithValue("E",
og.A1 + " " + og.A2 + " " + og.A3 +
" " + og.C);
execCmd.Parameters.AddWithValue("F", DBNull.Value);
execCmd.Parameters.AddWithValue("G", DBNull.Value);
execCmd.Parameters.AddWithValue("H", og.Cs);
execCmd.Parameters.AddWithValue("I", ss);
execCmd.Parameters.AddWithValue("J", DBNull.Value);
execCmd.Parameters.AddWithValue("K", "N");
execCmd.Parameters.Add(outParam);
conn.executeCommand(execCmd, trx);