How to connect ASP.Net with Oracle Database?

Discussion in 'ASP .Net' started by ´ï´ï, Apr 19, 2005.

  1. ´ï´ï

    ´ï´ï Guest

    How to connect asp.net with Oracle Database?
    Where and How to? Thanks very much.
     
    ´ï´ï, Apr 19, 2005
    #1
    1. Advertising

  2. Standard:
    "Data Source=MyOracleDB;Integrated Security=yes;"
    This one works only with Oracle 8i release 3 or later

    Specifying username and password:
    "Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated Security=no;"
    This one works only with Oracle 8i release 3 or later

    Declare the OracleConnection:

    C#:
    using System.Data.OracleClient;
    OracleConnection oOracleConn = new OracleConnection();
    oOracleConn.ConnectionString = "my connectionstring";
    oOracleConn.Open();

    VB.NET:
    Imports System.Data.OracleClient
    Dim oOracleConn As OracleConnection = New OracleConnection()
    oOracleConn.ConnectionString = "my connectionstring"
    oOracleConn.Open()



    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en Español
    Ven, y hablemos de ASP.NET...
    ======================

    "´ï´ï" <> wrote in message news:...
    > How to connect asp.net with Oracle Database?
    > Where and How to? Thanks very much.
    >
    >
     
    Juan T. Llibre, Apr 19, 2005
    #2
    1. Advertising

  3. ´ï´ï

    Mikeda Guest

    Thanks very much.
    But if i wanna use ODP.Net to connect with ASP.Net?
    Is it better then yours?
    Then I am beginner.Thank you.

    "Juan T. Llibre" <> ????
    news:#...
    Standard:
    "Data Source=MyOracleDB;Integrated Security=yes;"
    This one works only with Oracle 8i release 3 or later

    Specifying username and password:
    "Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated
    Security=no;"
    This one works only with Oracle 8i release 3 or later

    Declare the OracleConnection:

    C#:
    using System.Data.OracleClient;
    OracleConnection oOracleConn = new OracleConnection();
    oOracleConn.ConnectionString = "my connectionstring";
    oOracleConn.Open();

    VB.NET:
    Imports System.Data.OracleClient
    Dim oOracleConn As OracleConnection = New OracleConnection()
    oOracleConn.ConnectionString = "my connectionstring"
    oOracleConn.Open()



    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en Español
    Ven, y hablemos de ASP.NET...
    ======================

    "´ï´ï" <> wrote in message
    news:...
    > How to connect asp.net with Oracle Database?
    > Where and How to? Thanks very much.
    >
    >
     
    Mikeda, Apr 19, 2005
    #3
  4. To answer your question I would say "yes", ODP.NET is better for working
    with Oracle. The programming model is the same in most tasks and similar in
    the rest and it is tuned to Oracle. There are a few instances where
    OracleClient is better, due to having to work with both .NET and Java, but
    it is generally neglegible. For the newest Oracle database (10g), I do not
    believe you can use the OracleClient that ships with Visual Studio as the
    Oracle internals have changed.

    The code that Juan shared is very close to ODP.NET and you can download
    samples of code for ODP.NET from the same site you download ODP.NET:
    http://otn.oracle.com

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ***********************************************
    Think outside the box!
    ***********************************************
    "Mikeda" <> wrote in message
    news:...
    > Thanks very much.
    > But if i wanna use ODP.Net to connect with ASP.Net?
    > Is it better then yours?
    > Then I am beginner.Thank you.
    >
    > "Juan T. Llibre" <> ????
    > news:#...
    > Standard:
    > "Data Source=MyOracleDB;Integrated Security=yes;"
    > This one works only with Oracle 8i release 3 or later
    >
    > Specifying username and password:
    > "Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated
    > Security=no;"
    > This one works only with Oracle 8i release 3 or later
    >
    > Declare the OracleConnection:
    >
    > C#:
    > using System.Data.OracleClient;
    > OracleConnection oOracleConn = new OracleConnection();
    > oOracleConn.ConnectionString = "my connectionstring";
    > oOracleConn.Open();
    >
    > VB.NET:
    > Imports System.Data.OracleClient
    > Dim oOracleConn As OracleConnection = New OracleConnection()
    > oOracleConn.ConnectionString = "my connectionstring"
    > oOracleConn.Open()
    >
    >
    >
    > Juan T. Llibre
    > ASP.NET MVP
    > http://asp.net.do/foros/
    > Foros de ASP.NET en Español
    > Ven, y hablemos de ASP.NET...
    > ======================
    >
    > "´ï´ï" <> wrote in message
    > news:...
    >> How to connect asp.net with Oracle Database?
    >> Where and How to? Thanks very much.
    >>
    >>

    >
    >
     
    Cowboy \(Gregory A. Beamer\), Apr 19, 2005
    #4
  5. re:
    > But if i wanna use ODP.Net to connect with ASP.Net?
    > Is it better then yours?


    Those *are* the connection strings for the
    ..NET Framework Data Provider for Oracle (ODP.NET).

    You can download it at:
    http://www.microsoft.com/downloads/...29-17dc-45ea-bfb3-076d1c052524&displaylang=en

    And learn a bit more about it at:
    http://www.c-sharpcorner.com/Code/2004/Feb/ODP.NET02.asp

    You could also use OleDb :

    This one's from Microsoft :
    "Provider=msdaora;Data Source=MyOracleDB;User Id=UserName;Password=asdasd;"

    The following are from Oracle :

    Standard Security:
    "Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User
    Id=Username;Password=asdasd;"

    Trusted Connection:
    "Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;OSAuthent=1;"

    Or, you could also use OraDirect : http://www.crlab.com/oranet/

    OraDirect .NET supports Oracle 10g, 9i, 8i and 8.0,
    including Personal and Lite editions.

    Their provider works with .NET Framework 1.0, 1.1, and 2.0.
    It will cost you $$$, though. ( $100 to $150 ).




    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en Español
    Ven, y hablemos de ASP.NET...
    ======================

    "Mikeda" <> wrote in message
    news:...
    > Thanks very much.
    > But if i wanna use ODP.Net to connect with ASP.Net?
    > Is it better then yours?
    > Then I am beginner.Thank you.
    >
    > "Juan T. Llibre" <> ????
    > news:#...
    > Standard:
    > "Data Source=MyOracleDB;Integrated Security=yes;"
    > This one works only with Oracle 8i release 3 or later
    >
    > Specifying username and password:
    > "Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated
    > Security=no;"
    > This one works only with Oracle 8i release 3 or later
    >
    > Declare the OracleConnection:
    >
    > C#:
    > using System.Data.OracleClient;
    > OracleConnection oOracleConn = new OracleConnection();
    > oOracleConn.ConnectionString = "my connectionstring";
    > oOracleConn.Open();
    >
    > VB.NET:
    > Imports System.Data.OracleClient
    > Dim oOracleConn As OracleConnection = New OracleConnection()
    > oOracleConn.ConnectionString = "my connectionstring"
    > oOracleConn.Open()
    >
    >
    >
    > Juan T. Llibre
    > ASP.NET MVP
    > http://asp.net.do/foros/
    > Foros de ASP.NET en Español
    > Ven, y hablemos de ASP.NET...
    > ======================
    >
    > "´ï´ï" <> wrote in message
    > news:...
    >> How to connect asp.net with Oracle Database?
    >> Where and How to? Thanks very much.
    >>
    >>

    >
    >
     
    Juan T. Llibre, Apr 19, 2005
    #5
  6. Thanks, Cowboy.

    Here's some specific URLs for samples :

    Simple:
    http://www.oracle.com/technology/sample_code/tech/windows/odpnet/odpbasic.html

    Advanced:
    http://www.oracle.com/technology/sample_code/tech/windows/odpnet/odpadv.html

    XML:
    http://www.oracle.com/technology/sample_code/tech/windows/odpnet/v9204/index.html

    How-To ( Tutorials ) :
    http://www.oracle.com/technology/sample_code/tech/windows/odpnet/howto/index.html



    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en Español
    Ven, y hablemos de ASP.NET...
    ======================

    "Cowboy (Gregory A. Beamer)" <> wrote in
    message news:...
    > To answer your question I would say "yes", ODP.NET is better for working
    > with Oracle. The programming model is the same in most tasks and similar
    > in the rest and it is tuned to Oracle. There are a few instances where
    > OracleClient is better, due to having to work with both .NET and Java, but
    > it is generally neglegible. For the newest Oracle database (10g), I do not
    > believe you can use the OracleClient that ships with Visual Studio as the
    > Oracle internals have changed.
    >
    > The code that Juan shared is very close to ODP.NET and you can download
    > samples of code for ODP.NET from the same site you download ODP.NET:
    > http://otn.oracle.com
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > ***********************************************
    > Think outside the box!
    > ***********************************************
    > "Mikeda" <> wrote in message
    > news:...
    >> Thanks very much.
    >> But if i wanna use ODP.Net to connect with ASP.Net?
    >> Is it better then yours?
    >> Then I am beginner.Thank you.
    >>
    >> "Juan T. Llibre" <> ????
    >> news:#...
    >> Standard:
    >> "Data Source=MyOracleDB;Integrated Security=yes;"
    >> This one works only with Oracle 8i release 3 or later
    >>
    >> Specifying username and password:
    >> "Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated
    >> Security=no;"
    >> This one works only with Oracle 8i release 3 or later
    >>
    >> Declare the OracleConnection:
    >>
    >> C#:
    >> using System.Data.OracleClient;
    >> OracleConnection oOracleConn = new OracleConnection();
    >> oOracleConn.ConnectionString = "my connectionstring";
    >> oOracleConn.Open();
    >>
    >> VB.NET:
    >> Imports System.Data.OracleClient
    >> Dim oOracleConn As OracleConnection = New OracleConnection()
    >> oOracleConn.ConnectionString = "my connectionstring"
    >> oOracleConn.Open()
    >>
    >>
    >>
    >> Juan T. Llibre
    >> ASP.NET MVP
    >> http://asp.net.do/foros/
    >> Foros de ASP.NET en Español
    >> Ven, y hablemos de ASP.NET...
    >> ======================
    >>
    >> "´ï´ï" <> wrote in message
    >> news:...
    >>> How to connect asp.net with Oracle Database?
    >>> Where and How to? Thanks very much.
    >>>
    >>>

    >>
    >>

    >
    >
     
    Juan T. Llibre, Apr 19, 2005
    #6
  7. ´ï´ï

    Mikeda Guest

    Oh?Thanks very much~~I will try later..
    "Cowboy (Gregory A. Beamer)" <> дÈëÏûÏ¢
    news:...
    > To answer your question I would say "yes", ODP.NET is better for working
    > with Oracle. The programming model is the same in most tasks and similar

    in
    > the rest and it is tuned to Oracle. There are a few instances where
    > OracleClient is better, due to having to work with both .NET and Java, but
    > it is generally neglegible. For the newest Oracle database (10g), I do not
    > believe you can use the OracleClient that ships with Visual Studio as the
    > Oracle internals have changed.
    >
    > The code that Juan shared is very close to ODP.NET and you can download
    > samples of code for ODP.NET from the same site you download ODP.NET:
    > http://otn.oracle.com
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > ***********************************************
    > Think outside the box!
    > ***********************************************
    > "Mikeda" <> wrote in message
    > news:...
    > > Thanks very much.
    > > But if i wanna use ODP.Net to connect with ASP.Net?
    > > Is it better then yours?
    > > Then I am beginner.Thank you.
    > >
    > > "Juan T. Llibre" <> ????
    > > news:#...
    > > Standard:
    > > "Data Source=MyOracleDB;Integrated Security=yes;"
    > > This one works only with Oracle 8i release 3 or later
    > >
    > > Specifying username and password:
    > > "Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated
    > > Security=no;"
    > > This one works only with Oracle 8i release 3 or later
    > >
    > > Declare the OracleConnection:
    > >
    > > C#:
    > > using System.Data.OracleClient;
    > > OracleConnection oOracleConn = new OracleConnection();
    > > oOracleConn.ConnectionString = "my connectionstring";
    > > oOracleConn.Open();
    > >
    > > VB.NET:
    > > Imports System.Data.OracleClient
    > > Dim oOracleConn As OracleConnection = New OracleConnection()
    > > oOracleConn.ConnectionString = "my connectionstring"
    > > oOracleConn.Open()
    > >
    > >
    > >
    > > Juan T. Llibre
    > > ASP.NET MVP
    > > http://asp.net.do/foros/
    > > Foros de ASP.NET en Español
    > > Ven, y hablemos de ASP.NET...
    > > ======================
    > >
    > > "´ï´ï" <> wrote in message
    > > news:...
    > >> How to connect asp.net with Oracle Database?
    > >> Where and How to? Thanks very much.
    > >>
    > >>

    > >
    > >

    >
    >
     
    Mikeda, Apr 20, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Yanick Quirion

    Connect Oracle Database C

    Yanick Quirion, Feb 26, 2004, in forum: C Programming
    Replies:
    1
    Views:
    4,317
    Peter Pichler
    Feb 26, 2004
  2. Benson, John
    Replies:
    1
    Views:
    2,242
    Aurelio Martin
    Jan 28, 2004
  3. Pieter Claerhout
    Replies:
    0
    Views:
    616
    Pieter Claerhout
    Jan 28, 2004
  4. Feyruz
    Replies:
    4
    Views:
    2,246
    Sherm Pendley
    Oct 14, 2005
  5. Replies:
    2
    Views:
    302
Loading...

Share This Page