Connecting to Oracle and DB2 from C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • desigan
    New Member
    • Sep 2006
    • 7

    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
  • girish
    New Member
    • Sep 2006
    • 6

    #2
    Originally posted by desigan
    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=MSDAO RA.1 (Microsoft)

    and Provider for Oracle Driver is : Provider=OraOLE DB.Oracle.1MSDA ORA.1

    Comment

    • desigan
      New Member
      • Sep 2006
      • 7

      #3
      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.DataAcce ss)

      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

      Comment

      Working...