To retrieve Oracle LONG type data using the ODP.NET driver in Visual Studio, you can follow these steps:
- Set InitialLONGFetchSize: You already mentioned setting
InitialLONGFetchSize = -1. This is a correct approach as it allows the driver to fetch the entire LONG data when retrieving it. - Using the ODP.NET Driver: Ensure that you are using the ODP.NET driver correctly to access the LONG data. If you are using
OracleDataReader, you can retrieve LONG data by callingGetOracleStringorGetOracleBinarymethods, depending on the type of LONG data you are dealing with. - Connection Configuration: Since you are using
IVsDataConnection, you may need to check if there is a way to configure the connection string or properties to include theInitialLONGFetchSize. This might not be directly exposed throughIVsDataConnection, so you may need to look into the underlying connection string or configuration options available in ODP.NET. - Testing with a Simple Query: As a test, run a simple query that selects the LONG column directly to see if it returns data. This can help isolate whether the issue lies with the connection setup or the way the data is being fetched.
If you continue to face issues, consider checking the Oracle documentation for any specific configurations or limitations regarding LONG data types and ODP.NET.
References: