public static void WriteLob(string table_name
{
OracleConnection myCn = new OracleConnection(strConn);
OracleCommand myCmd = new OracleCommand();
try
{
myCn
}
catch(System
{
throw new Exception(e
}
OracleTransaction myTrans = myCn
try
{
myCmd
myCmd
myCmd
OracleDataReader reader = myCmd
using(reader)
{
reader
OracleLob CLOB = reader
Encoding UTF
byte[] buffer = UTF
if(buffer
CLOB
else
CLOB
//CLOB
myTrans
}
}
catch(System
{
myTrans
throw new Exception(e
}
finally
{
myCmd
myCn
}
}
public static string ReadLob(string table_name
{
OracleConnection myCn = new OracleConnection(strConn);
OracleCommand myCmd = new OracleCommand();
try
{
myCn
}
catch(System
{
throw new Exception(e
}
OracleTransaction myTrans = myCn
try
{
myCmd
myCmd
myCmd
OracleDataReader reader = myCmd
using(reader)
{
reader
OracleLob CLOB = reader
int[] content = new int[(int)CLOB
byte[] buffer = new byte[(int)CLOB
for(int i =
{
content = CLOB
buffer = (byte)content;
}
Encoding utf
string final = utf
myTrans
return final;
}
}
catch(System
{
myTrans
throw new Exception(e
}
finally
{
myCmd
myCn
}
}
From:http://tw.wingwit.com/Article/program/Oracle/201311/17736.html