oracle connection
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: oracle connection

  1. #1
    Join Date
    Jan 2002
    Location
    Pakistan
    Posts
    5

    oracle connection

    Hi,
    Can anyone tell me how can I connect orace database through ASP.NET and C#. I mean I am using c# code in asp.net and want to connect to oracle.

    Please help what libraries should I use and how?
    Fawaz

  2. #2
    Join Date
    May 2002
    Location
    Hyderabad,India.
    Posts
    27

    Connecting to oracle

    <%@ Page Language="C#" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="System.OleDb" %>

    <script runat="server">

    OleDbConnection cn=new OleDbConnection("
    PROVIDER=MSDAORA.1;user id=scott;password=tiger;
    data source=oracle");
    cn.Open();
    OleDbDataReader dr=new OleDbDataReader("
    select * from emp", cn);

    </script>

    ********
    In connection string

    User ID : Ur oracle data base user id.
    Password : Ur oracle data base Password.
    data source : this should be set in server system's oranames.ini file.

  3. #3
    Join Date
    May 2002
    Location
    Hyderabad,India.
    Posts
    27
    Code:
    <%@ Page Language="C#" %>
    <%@ Import NameSpace="System.Data" %>
    <%@ Import NameSpace="System.OleDb" %>
    
    <script runat="server">
    
    OleDbConnection cn=new OleDbConnection("PROVIDER=
    MSDAORA.1;user id=scott;password=tiger;data source=
    oracle");
    cn.Open();
    
    OleDbDataReader dr=new OleDbDataReader("
    select * from emp", cn);
    
    </script>


    In connection string

    User ID : Ur oracle data base user id.
    Password : Ur oracle data base Password.
    data source : this should be set in server system's oranames.ini file.

  4. #4
    Join Date
    May 2002
    Location
    Hyderabad,India.
    Posts
    27
    Code:
    <%@ Page Language="C#" %>
    <%@ Import NameSpace="System.Data" %>
    <%@ Import NameSpace="System.OleDb" %>
    
    <script runat="server">
    
    OleDbConnection cn=new OleDbConnection("PROVIDER=
    MSDAORA.1;user id=scott;password=tiger;data source=
    oracle");
    cn.Open();
    
    OleDbDataReader dr=new OleDbDataReader("
    select * from emp", cn);
    
    </script>


    In connection string

    User ID : Ur oracle data base user id.
    Password : Ur oracle data base Password.
    data source : this should be set in server system's oranames.ini file.

  5. #5
    Join Date
    May 2002
    Location
    Hyderabad,India.
    Posts
    27
    Code:
    <%@ Page Language="C#" %>
    <%@ Import NameSpace="System.Data" %>
    <%@ Import NameSpace="System.OleDb" %>
    <script runat="server">
    OleDbConnection cn=new OleDbConnection("PROVIDER=
    MSDAORA.1;user id=scott;password=tiger;data source=
    oracle");
    cn.Open();
    OleDbDataReader dr=new OleDbDataReader("
    select * from emp", cn);
    </script>
    In connection string

    User ID : Ur oracle data base user id.
    Password : Ur oracle data base Password.
    data source : this should be set in server system's oranames.ini file.

  6. #6
    Join Date
    May 2002
    Location
    Hyderabad,India.
    Posts
    27
    namespace:
    System
    System.Data
    System.OleDb

    OleDbConnection cn=new OleDbConnection("
    PROVIDER=MSDAORA.1;user id=scott;password=
    tiger;data source=oracle");

  7. #7
    Join Date
    Jun 2002
    Location
    Salzburg, Austria
    Posts
    1
    hi,

    if you want to use a more direct way to access oracle, have a look at http://www.crlab.com/products.html

    they provide access via the oci...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center