|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Saturday, September 01, 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..
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Friday, March 29, 2013 11:17 AM
Points: 3,432,
Visits: 14,332
|
|
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
|
|
|
|