가능한 중복은 :
Why Do I get OutOfRange Exception in GetOrdinal Function of this CLOB field?CLOB 필드를 C# 변수로 읽는 방법?
I need to read a CLOB field from an ORACLE table int a C# variable of type String. Does anyone know how to accomplish this task?
이것은 내가 짓을하지만 필드의 GetOrdinal을 계산할 때 내가 IndexOutofRange을 얻고 것입니다. 미리 감사드립니다.
public void ReadFunction(string FName, out string fContent)
{
OracleCommand command = _connection.CreateCommand();
OracleTransaction transaction = _connection.BeginTransaction();
command.Transaction = transaction;
command.CommandText = "SELECT TO_CLOB(TO_NCLOB(FUNCTION_SCRIPT)) FROM IS_FUNCTION where FNAME=:fName ";
command.Parameters.Add("FName", OracleType.NVarChar).Value = FName;
OracleDataReader odr = command.ExecuteReader();
int temp = odr.GetOrdinal("FUNCTION_SCRIPT");
OracleLob myLob = odr.GetOracleLob(temp);
fContent = (String)myLob.Value;
odr.close();
}
음? http://stackoverflow.com/questions/12574341/why-do-i-get-outofrange-exception-in-getordinal-function-of-this-clob-field –
도움이 필요 심하게 생각하고 제 질문의 제목을 개선해야 할 필요가 있다고 생각했습니다. – user1298925
@ user1298925 그러면 원래 질문의 제목을 편집해야합니다. – phoog