Anyone familar with .net Oracle programming?

J

jens Jensen

I have the following code:

OracleConnection ocn = null;

ocn = new
OracleConnection(ConfigurationManager.AppSettings["ODB_Connectionstring"]);

OracleParameter omid = new OracleParameter("OUT_MESSAGE_ID",
OracleType.Int32);

omid.Direction = ParameterDirection.Output;

OracleParameter om = new OracleParameter("OUT_MESSAGE", OracleType.Clob);

om.Direction = ParameterDirection.Output;



using (ocn)

{

try

{


OracleHelper.ExecuteNonQuery(ocn, CommandType.StoredProcedure,
"GET_MESSAGE", omid,om);

message_id =(int)omid.Value;

message=om.Value.ToString();

if (message ==DBNull.Value.ToString()) return false;

Console.WriteLine(message_id);

Console.WriteLine(message);


Console.Read();

return true;





}

catch

{

message_id =0;

message=null;

throw;

}



my question is , how to handle the OracleType.Clob in C#;

I undertand it should correspond to some form xmldocument type.

What is the exact type in ..Net?



many thanks in advance

JJ
 
H

Hans Kesting

my question is , how to handle the OracleType.Clob in C#;
I undertand it should correspond to some form xmldocument type.

What is the exact type in ..Net?



many thanks in advance

JJ

Isn't a *Character* Large OBject just a string in .Net?

Maybe some xml-string is stored there, but then you need to load that
string in a XmlDocument.


Hans Kesting
 
J

jens Jensen

this is not just a string. It is in fact an xml file as far as i can see.

I now need to find the proper conversion process...

Well i will try xmldocument.Load....
 
H

Hans Kesting

this is not just a string. It is in fact an xml file as far as i can see.
I now need to find the proper conversion process...

Well i will try xmldocument.Load....

The fact that the text looks like an xml document doesn't mean that
it's not a text. I think that the Oracle CLOB type is equivalent to the
SqlServer (n)text type.
So you need to load it into a string, and *then* you may convert it
into an XmlDocument by using the LoadXml() method.

Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top