473,413 Members | 1,778 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,413 software developers and data experts.

connect to Oracle server by using csharp

I have Oracle client in my system, like to use csharp to communicate
with Oracle server to
retrieve data.
I am very new in csharp, would anyone please give me an example codes
or web pointer.
thanks a lot.

Jul 13 '06 #1
2 5347
http://www.google.com/search?q=C%23+oracle

http://www.oracle.com/technology/pub...ok_dotnet.html

--
Adam Clauss

"blackdog" <cl***@hotmail.comwrote in message
news:11********************@i42g2000cwa.googlegrou ps.com...
>I have Oracle client in my system, like to use csharp to communicate
with Oracle server to
retrieve data.
I am very new in csharp, would anyone please give me an example codes
or web pointer.
thanks a lot.

Jul 13 '06 #2
blackdog wrote:
I have Oracle client in my system, like to use csharp to communicate
with Oracle server to
retrieve data.
I am very new in csharp, would anyone please give me an example codes
or web pointer.
thanks a lot.
using System.Data;
using System.Data.OracleClient;

class Program
{
pulic static void Main()
{
using (OracleConnection con = new OracleConnection("your connection
string here"))
{
OracleCommand cmd = con.CreateCommand();
cmd.CommandText = "select something from some database";
using (OracleDataReader rdr = cmd.ExecuteReader())
{
if (rdr.Read())
// ... read some data
}
}
}
}

http://msdn2.microsoft.com/en-us/lib...cleclient.aspx

You have to use .NET 1.1 or 2.0 to use OracleClient, otherwise you can use
System.Data.OleDb if you have to use .NET 1.0. You have to install the
Oracle client tools on the machine that will access the oracle server.

-cd
Jul 13 '06 #3

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

Similar topics

2
by: Hari Om | last post by:
Cannot connect as Internal Hello, I am using IBM AIX 5.1L box for Oracle 9.2.0.1. I cannot connect as internal to my DB INstance - wonder why? Here is what is do:...
4
by: Ellen K. | last post by:
Hi all, Being that so far I didn't get an answer to my below problem on the Oracle newsgroup, I figured it couldn't hurt to try here. While at my current job I've been working with mostly SQL...
2
by: Andrew | last post by:
Hi all! Sorry guys but I am totally ignorant on oracle matters. I need some guidance in how and what is needed to connect directly to an oracle 7.3.2.3.2 database on a OpenVMS operating system...
0
by: Zorba.GR | last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64 bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager...
8
by: danbredy | last post by:
Hi, I'm attempting to connect to an Oracle database using SQL Server 2005 Express (OS is Windows XP Professional) and having absolutely no luck. Here is the information SQL Plus gives me about...
7
by: D. Patrick | last post by:
I need to connect to an Oracle database. I've never done it before. I see that with framework 1.1 you had to download ODP.NET from Oracle's site in order for the framework classes to even work....
9
by: D. Patrick | last post by:
I need to connect to an Oracle database. I've never done it before. I see that with framework 1.1 you had to download ODP.NET from Oracle's site in order for the framework classes to even work....
8
by: CJM | last post by:
I have a working web application (ASP) which links to an Oracle 10g DB via OO4O. I'm trying to port it to either of two test servers, but in fact, I can't get it to work with either - 'Unable to...
8
by: BD | last post by:
I am developing C# win form app to work with remote database on SQL Server 2005. Problem scenario is as follows: 1. a form is open that has downloaded dataset to local cache 2. computer is...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.