我的应用程序使用 TimesTen DB 存储数据。下面是我更新数据并返回更新行的代码。
conn = new OracleConnection("My Connection");
conn.Open();
OracleTransaction tran = conn.BeginTransaction(IsolationLevel.ReadCommitted);
OracleCommand command = new OracleCommand();
command = new OracleCommand(@"DECLARE idNo NUMBER;
BEGIN
select id into idNo from " + prefix_db + @"tbl_request_in where upper(status)='PENDING' and ROWNUM <= 1 order by priority, id FOR update;
update " + prefix_db + @"tbl_request_in set status ='Processing',begin_time= SYSDATE(),response_node='10.9.70.47'
where upper(status) <> 'PROCESS' and upper(status) <> 'PROCESSING' and upper(status) <> 'OK' and upper(status)<>'ERROR'
and id=idNo;
OPEN :RETURNCURSOR for select * from APITT_tbl_request_in where id=idNo;
END;", conn);
command.Transaction = tran;
command.BindByName = true;
OracleParameter outNumPrm = command.Parameters.Add("RETURNCURSOR", OracleDbType.RefCursor, DBNull.Value, ParameterDirection.ReturnValue);
// create a data adapter to use with the data set
OracleDataAdapter da = new OracleDataAdapter(command);
// create the data set
DataSet ds = new DataSet();
// fill the data set
da.Fill(ds);
我给出错误
{Oracle.DataAccess.Client.OracleException ORA-01722:无效号码
在 Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck) at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src, Boolean bCheck) at Oracle.DataAccess.Client.OracleDataReader.Read() at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping) at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable数据表,字符串 srcTable,DataReaderContainer dataReader,Int32 startRecord,Int32 maxRecords,DataColumn parentChapterColumn,Object parentChapterValue)在 System.Data.Common.DataAdapter.Fill(DataSet dataSet,String srcTable,IDataReader dataReader,Int32 startRecord, Int32 maxRecords) 在 Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) 在 Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords、String srcTable、IDbCommand 命令、CommandBehavior 行为)在 System.Data.Common.DbDataAdapter.Fill(DataSet 数据集)填充(数据集数据集)填充(数据集数据集)
我该如何解决?