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

Connecting to Oracle and DB2 from C#

Friends,

My application needs to connect to both Oracle and DB2 from C#.

What is the best way to do it? [I am from Java and new to C#. In Java we write a common code in java JDBC API. This API will be implemented by both Oracle and DB2. Hence, my same code will work fine for both Oracle and DB2. Does any similar things exist in C#?]

Also, kindly pass me some URLs which might be useful in this regard.

Regards,
Desigan
Sep 12 '06 #1
2 2417
girish
6
Friends,

My application needs to connect to both Oracle and DB2 from C#.

What is the best way to do it? [I am from Java and new to C#. In Java we write a common code in java JDBC API. This API will be implemented by both Oracle and DB2. Hence, my same code will work fine for both Oracle and DB2. Does any similar things exist in C#?]

Also, kindly pass me some URLs which might be useful in this regard.

Regards,
Desigan
Hi
Client Server / Web Application you are talking about?

If you want to use Oracle Driver or Microsoft Driver to connect to Oracle
and oracle clients needs to be install at development machine.

Provider to connect to oracle 9i is :Provider=MSDAORA.1 (Microsoft)

and Provider for Oracle Driver is : Provider=OraOLEDB.Oracle.1MSDAORA.1
Sep 14 '06 #2
Thanks for the reply Girish.

I am using Client Server application.

I found that we can use the following ways to connect.

1) ODBC
2) OLEDB
3) Vendor specific APIs (like the one provided with C# Oracle.DataAccess)

I am fine with Oracle. But, for DB2 I am not able to find suitable driver. Hence, I am looking out for that.

Also, I am thinking about the better way to connect to both. [Something like same code getting reused for both connection and execution of queries]

Regards,
Desigan
Sep 14 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Wayne Happ | last post by:
I have Oracle 9 running on a Linux RedHat Box V9.0. But I'm having trouble connecting from a windows machine via PL/SQL Develover. When I startup the application the instance name appears but...
0
by: Kong Li | last post by:
Follow up to this thread, the latest Oracle 9i release 2 patchset (9.2.0.5) fixed the handle count leak problem. The problem is in Oracle client component. Thanks. Kong ----- From: Kong...
1
by: yahibble | last post by:
Now, I am no Python expert but I have dabbled and I have spent a couple of days with another engineer unsuccessfully installing oracle drivers for MS ODBC on the win XP machine. It looked to me...
2
by: msnesw.microsoft.com | last post by:
I developed a web application about a year ago that connects to the Oracle DB using MS ODBC for Oracle. But I had to move the whole application to a brand-new PC . When I try to run I get the...
2
by: Mahesh.V | last post by:
Hi All I get the following error while connecting to the oracle database using ODBC. in my VB.NET application. Can any one help me out solving this problem server message (if any):...
2
by: python_eager | last post by:
Hi i am connecting my database oracle 9i. While connecting i am getting the following error connection = cx_Oracle.connect("myusername", "mypassword", "python") RuntimeError: Unable to acquire...
0
by: antonyliu2002 | last post by:
I am having a hard time connecting to an oracle database from within Visual Web Developer (VWD) 2005 Express Edition. Check out the screen snap shot here: ...
2
by: rcc.gamer | last post by:
Hello All, I am trying to connect a GridView to an Oracle table using the standard SqlDataSource. The process is fairly simple and there are detailed instructions from Microsoft ......
0
by: Temporary | last post by:
C# Web Service in IIS Stops Connecting to Oracle (via ADO.NET) Over Time I have a Web Service, written in C#, published on a Windows XT Web Server under IIS, which repeatedly connects to an...
1
by: kinnu | last post by:
hi, could any one help me with the steps of connecting the vb form with the oracle database/table. I could connect vb to access. as my collage project requires connecting of vb with oracle...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...

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.