Connection with oracle9i

Last post 04-11-2007 9:06 AM by Prasanta.chowdhury. 7 replies.

Sort Posts:

  • Connection with oracle9i

    03-22-2007, 9:48 AM

    Hi,

       I am using WINDOWS XP PROFESSIONAL SP 2.

    I AM WORKING IN  ASP.NET PROJECT USING VISUAL STUDIO.NET 2003.

    I use the scripting language c#.

    I USE THE DATABASE ORACLE9I.

    HOW I CONNECT WITH ORACLE9I DATABASE ?

    please suggest me .

     

  • Re: Connection with oracle9i

    03-22-2007, 6:21 PM
    • Loading...
    • prbabu
    • Joined on 03-15-2007, 2:28 AM
    • Posts 12

    I would suggest you to go through the effort of understanding ADO .NET and the different database providers.

    Briefly, there are many ways to connect to the Oracle database in .NET:

    (1) Oracle's Data Provider for .NET called ODP  (need to confirm whether Oracle 9i is supported) - this is supposedly the best way. Need a separate download from Oracle, which is free.

    (2) Microsoft's data provider for Oracle - next best and comes as part of the .NET Framework base class libraries.

    (3).NET ODBC & .NET OLEDB- not best for performance

    (1) and (2) utilizes the native Oracle's OCI calls directly.

    Hope the above helps for your further investigation.

  • Re: Connection with oracle9i

    03-22-2007, 6:25 PM
    • Loading...
    • prbabu
    • Joined on 03-15-2007, 2:28 AM
    • Posts 12
    Just an additional note C# is not a scripting language !    
  • Re: Connection with oracle9i

    03-24-2007, 4:21 PM

    Thanks..

    Could I connect using ADO.net ? How?

  • Re: Connection with oracle9i

    03-25-2007, 7:05 PM
    Answer
    • Loading...
    • prbabu
    • Joined on 03-15-2007, 2:28 AM
    • Posts 12

    ADO .NET is a data access technology/model and all the above choices we listed earlier have an implementation of this model.  Could probably read up a simple tutorial I got through googling:

    http://samples.gotdotnet.com/quickstart/howto/doc/adoplus/ADOPlusOverview.aspx

     No short cut mate!

    -Praveen

  • Re: Connection with oracle9i

    03-29-2007, 8:34 AM
    • Loading...
    • veeaar
    • Joined on 03-13-2007, 5:43 AM
    • Posts 2

    Hey buddy!

    The above link given by praveen is indeed very informative. As an addon to the explanation you can find a crisp example here:-

    1    string ConnString = "data source=dsn1;user id=user1;password=pwd1;";
    2    OracleConnection NewConn = new OracleConnection(ConnString);
    3    string sql="SELECT * FROM Table1";
    4    OracleCommand NewComm = new OracleCommand(sql);
    5    NewComm.Connection = NewConn;
    6    try
    7    {
    8    	NewConn.Open();
    9    	OracleDataReader NewReader = NewComm.ExecuteReader();
    10   	DataGrid1.DataSource = NewReader;
    11   	DataGrid1.DataBind();
    12   }
    13   catch(Exception ex)
    14   {
    15           Label1.Text = ex.Message;
    16   }
    17   
    18   NewComm.Connection.close();
    19   NewComm.Connection.Dispose();
    
     
  • Re: Connection with oracle9i

    04-11-2007, 9:05 AM

    Hi,      praveen. Great.

    Thanks for your kind information.

  • Re: Connection with oracle9i

    04-11-2007, 9:06 AM

    Thanks..

    Prasanta

Page 1 of 1 (8 items)
Microsoft Communities
Page view counter