SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


oledb for pulling clob field of oracle to .net application


oledb for pulling clob field of oracle to .net application

Author
Message
ashok_gupta121
ashok_gupta121
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 22
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..
Gift Peddie
Gift Peddie
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16254 Visits: 14456
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search