我創建一個查詢,我似乎無法獲得超越Not all variables bound
錯誤甲骨文ORA-01008:並非所有與空
是最好的,我可以告訴約束變量,一切看起來是正確的。我錯過了什麼?
代碼混淆了一下,以保護無辜...
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);
輝煌。也爲我工作! –