This discussion is archived
1 Reply Latest reply: Nov 29, 2013 12:37 PM by Alex_Keh - Oracle_Product_Manager RSS

ODP.net does not display value of a column

user8972079 Newbie
Currently Being Moderated

Hi,

 

I am new to ODP.net, usually using OracleClient of .NET framework. I try to execute this sql select SEARCH_CONDITION from user_constraints where constraint_type = 'C';

using OracleDataReader. When I try to retrieve all value of SEARCH_CONDITION column, it is empty. I tested with Oracle Sql Developer and it display something there.


I am using Oracle.DataAccess.dll 2.112.1.0 x64 for oracle 11g to access oracle 11g x64.

  • 1. Re: ODP.net does not display value of a column
    Alex_Keh - Oracle_Product_Manager Expert
    Currently Being Moderated

    If you don't have a unique identifier in the SELECT list, you'll hit the following issue described in the doc:

    ==================

    To obtain data beyond the InitialLONGFetchSize characters or bytes, one of the following must be in the select list:

    • Primary key
    • ROWID
    • Unique columns - (defined as a set of columns on which a unique constraint has been defined or a unique index has been created, where at least one of the columns in the set has a NOT NULL constraint defined on it)

    To be able to fetch the entire LONG or LONG RAW data without having a primary key column, a ROWID, or unique columns in the select list, set the size of theInitialLONGFetchSize property on the OracleCommand object to equal or greater than the number of characters or bytes needed to be retrieved.

    ==================

     

    By default, InitialLONGFetchSize is zero. You can increase the property size on the OracleCommand (e.g. cmd.InitialLONGFetchSize = 1000) so that you can fetch the entire value without requiring a primary key or similar.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points