问题很简单,如问题主题中所述。我尝试使用INSERT...RETURNING
子句运行一些查询,当我尝试执行它时会引发 ORA-12537 异常。来源如下:
using ( OracleCommand command = new OracleCommand () ) {
command.Connection = connection;
command.BindByName = true;
command.CommandText = "INSERT INTO objects(name)VALUES(:objectName)RETURNING id INTO :objectId";
command.Parameters.Add ( "objectName", OracleDbType.Varchar2, ParameterDirection.Input );
command.Parameters.Add ( "objectId", OracleDbType.Int64, ParameterDirection.Output );
command.ExecuteNonQuery ();
}
最后一行的执行导致 OracleException 被 message 引发ORA-12537: Network Session: End of file
。RETURNING
在没有子句的情况下运行相同的查询显然很顺利。