日期:2014-05-18 浏览次数:20915 次
private void EXT_SQL_TEST() { string strMsg = "OK"; try { StringBuilder strSql = new StringBuilder(); strSql.Append(" BEGIN; "); strSql.Append(" INSERT INTO Order_Main (UUID) values (6); "); strSql.Append(" INSERT INTO Order_Main (UUID) values (7); "); strSql.Append(" INSERT INTO Order_Main (UUID) values (8); "); strSql.Append(" INSERT INTO Order_Main (UUID) values (9); "); strSql.Append(" END; "); OracleHelper.ExecuteNonQuery(oradb, CommandType.Text, strSql.ToString()); } catch (Exception ex) { strMsg = ex.ToString(); } if (strMsg != "OK") { MessageBox.Show(strMsg); } else { } }
System.Data.OracleClient.OracleException: ORA-06550: 第 1 行, 第 7 列: PLS-00103: 出现符号 \";\"在需要下列之一时: begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge <a single-quoted SQL string> pipe 符号 \"exit\" 被替换为 \";\" 后继续。 at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor) at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()