473,405 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Anyone familar with .net Oracle programming?

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
Mar 20 '06 #1
5 3560
> 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
Mar 20 '06 #2
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....
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

Mar 20 '06 #3
Hi,
try the ado.net group.

Ab.

"jens Jensen" <je**@jensen.dk> wrote in message
news:Ox**************@TK2MSFTNGP09.phx.gbl...
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

Mar 20 '06 #4
> 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
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

Mar 20 '06 #5
Found solution via googling!

http://www.csharpfriends.com/Forums/...x?PostID=33277

OracleLob _myLob = (OracleLob)_parameters[1].Value;
myString = System.Convert.ToString(_myLob .Value);
Mar 20 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: cyber-arkitect | last post by:
Hello all: I am a Solaris Unix Administrator with 6+ yrs. of experience in major companies who also has experience with AIX. Since I am good at Unix I would like to move into Oracle world,...
1
by: Denzil | last post by:
Hi, I am retrieving my DB values and setting them in the MyRS::DoFieldExchange(CFieldExchange* pFX) function. One of these records is a Long datatype and could be "Null" in the DB table. The...
11
by: jrefactors | last post by:
I want to know the differences between SQL Server 2000 stored procedures and oracle stored procedures? Do they have different syntax? The concept should be the same that the stored procedures...
13
by: BigDaDDY | last post by:
Um yeah....In case you haven't figured it out, Microsoft sucks. I'm going to be kicked back in my chair eating popcorn and watching football 10 years from now, while all you clowns are scrambling...
0
by: Asheesh | last post by:
Hi, I want to configure client machine with oracle database server thru .Net programming. Can any body tell me how? Actually the scenario is: I am crating .net setup project for complete...
6
by: ´ď´ď | last post by:
How to connect asp.net with Oracle Database? Where and How to? Thanks very much.
27
by: Nasir | last post by:
Hi there, Is it posible to set the collation of SQL server 2005 like Oracle, which is that objects names and column names are case-insensitive, but data is sensitive;e.g: In Oracle: --create...
0
by: Jack | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available....
0
by: Winder | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available....
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.