Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

oracle CLOB data in c#

Status
Not open for further replies.

DanielXIX

Programmer
Jul 31, 2005
18
TR
Hi all,

How do i get clob data using c# ?

Any help appreciated.
 
Which Oracle components are you using? The ones from MS that came with Visual Studio or the ODAC components from Oracle?

Using the components from Oracle, I have the following code for loading data into a clob to be sent as a parameter to a stored procedure:
Code:
Oracle.DataAccess.Types.OracleClob clob = new Oracle.DataAccess.Types.OracleClob(arcConnect);
clob.Write(rptList.ToCharArray(), 0, rptList.Length);

As for reading data from a clob, the OracleClob type has a Read method that you can use to read the clob contents into an array of either char or byte.

The MS Oracle component set has an OracleLob type. I haven't used it, but it may have similar capabilities.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top