oledb for pulling clob field of oracle to .net application

  • 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);


    OleDbDataReader oleReader = olecomm.ExecuteReader();

    while (oleReader.Read())


    strcommodity = oleReader.GetString(0);





    Any one has any idea if clob is not supported by oledb provider or i am making any mistake...?

    pls provide ur input..

  • 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.


    Kind regards,
    Gift Peddie

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply