Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

oledb for pulling clob field of oracle to .net application Expand / Collapse
Author
Message
Posted Thursday, November 29, 2007 12:39 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, September 1, 2012 2:05 PM
Points: 1, Visits: 16
hi,
I am trying to read a clob field of an oracle table through oledbcommand but it throws an exception saying "datatype is not supported".
I am using .NET 2.0 with VS2005 not sure about the oracle version of server
public void clob()
{
string strcommodity = null;
string connectionString = "PASSWORD=abc;PERSIST SECURITY INFO=TRUE;USER ID=abc;DATA SOURCE=abc;provider=MSDAORA;";
OleDbConnection OleDbCon = new OleDbConnection(connectionString);
OleDbCommand olecomm = new OleDbCommand("select clobcolumn from table1",OleDbCon);
OleDbCon.Open();
OleDbDataReader oleReader = olecomm.ExecuteReader();
while (oleReader.Read())
{
strcommodity = oleReader.GetString(0);
}
OleDbCon.Close();
oleReader.Close();
}
Any one has any idea if clob is not supported by oledb provider or i am making any mistake...?
pls provide ur input..
Post #427714
Posted Tuesday, December 4, 2007 10:04 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Wednesday, October 15, 2014 2:32 PM
Points: 3,428, Visits: 14,439
I don't understand why you need to use OLEDB instead of the Microsoft or Oracle providers both are free. I also noticed there is no memory stream in you code, I don't think you can use image in Asp.net pages without passing your image through memory stream. Look at the code sample in the link below using ODP.NET. Hope this helps.

http://www.oracle.com/technology/oramag/oracle/05-nov/o65odpnet.html


Kind regards,
Gift Peddie
Post #429423
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse