Library tutorials & articles

Oracle8 and Oracle8i

Connecting to an Oracle database

There are a number of ways in  which we can connect to an Oracle database in order to manipulate its data from within our ASP scripts. Which one you use rather depends what you are trying to achieve and whether your organization prefers access through stored procedures, as the features supported by one method may not be supported in another.

As well as Oracle Corporation, there are many third-party vendors such as Microsoft and Intersolv that provide a number of products to communicate with Oracle. The following list represents the more commonly used tools :

  • Microsoft OLE DB Provider for Oracle
  • Microsoft OLE DB Provider for ODBC
  • Microsoft ODBC Driver for Oracle
  • Oracle ODBC Driver
  • Intersolv's Merant range of OLE DB providers and ODBC drivers
  • Oracle Objects for OLE by Oracle
  • Oracle Provider for OLE DB by Oracle
  • Microsoft's Universal Data Access (UDA) initiative  contains a set of tools that we can use to communicate with an Oracle database. With the integrated Microsoft Data Access Components (MDAC) suite we can use ActiveX Data Objects (ADO) in conjunction with the Microsoft OLE DB Provider For Oracle (MSDAORA.DLL)  or the Microsoft ODBC Driver for Oracle (MSORCL32.DLL) to communicate effectively with Oracle in a way that is reliable, scalable and offers high performance when using ADO.

    Microsoft also offers the universal OLE DB Provider for ODBC Drivers (MSDASQL.DLL) that allows any ODBC data source to make use of the improvements in OLE DB. This, the default provider used by ADO, was developed so that any existing ODBC-based data could fit into the UDA environment efficiently and without losing an organization's ODBC investment .


    As if this didn't give us enough flexibility, we also have the universal  Merant range of OLE DB providers and ODBC drivers from Intersolv (www.merant.com/products/datadirect/oledb
    /Connect/factsheet.asp), and Oracle Objects for OLE (OO4O).

    We've discussed how Oracle8's Net8 networking component is used to communicate with an Oracle8 database, but we haven't mentioned the Oracle Call Interface (OCI) library . We won't go into much detail except to say that this low-level layer exposes certain procedures that the OLE DB providers and ODBC drivers call in order to communicate with the database, in much the same way as DBLib for SQL Server databases.

    After that brief overview, it is now time to show you how to connect to an Oracle8 database using the more popular technologies so that you can see the relative pros and cons of each in terms of feature support, performance, and ease.

    There are bound to be times when you need the ability to fetch recordsets from an Oracle stored procedure with ADO. At the time of writing you have no choice but to use the ODBC driver for Oracle or Oracle's Oracle Provider for OLE DB, both of which will be covered later.

    Comments

    1. 21 May 2009 at 09:05

      fuck all programmers!

    2. 16 Mar 2004 at 10:45

      How can I create a master detail web form using ASP, ADO, vbscript, and HTML?jarvis@anteon.com">email me

    3. 02 Dec 2003 at 04:10
      Hi all,

      I've been trying to use the OLE DB connection from ASP to Oracle. Used the code from the examples. Working fine but it did not release the session connection and when the sessions reach the maximum defined, it will fail to work. Pls Help. Thank you.

      KK
    4. 19 Jun 2003 at 05:15
      Hi,
       I using .NET to access Oracle DB  (with OLEDB Provider for Oracle) but I have a trouble that I couldn't use Unicode datatype (such as: NCHAR, NVARCHAR2).
       
       Anyone knows how to do this or any Provider that allows us access Oracle DB with Unicode datatype?

       Thanks for you kindness.
       TCAN.
    5. 24 Feb 2003 at 12:17

      im trying to get this to work:


      when the form loads, a csv file is opened and whose contents are displayed in the Current list view control. if the user selects an item from the Current listview control and presses the "delete" key (i've been using the Keypress event), a message box will pop up asking them to confirm their decision. If they say yes, the entire row is cleared and that row's information is passed to another listview control (the Archives listview control, which is saved onto its own file)


      the main things i need to know are the ASCII code for the delete key (127 doesn't work...), and how to delete an entire row in a listview control (and the other records below it should be moved up as a result.) If you could tell me how to then pass it onto the second listview control as well, that would be greatly appreciated.


      thanks in advance

    6. 24 Feb 2003 at 10:39
      Hi,
           i am currently do a project on oracle and microsoft. The question is compare and contrast the latest database offerings from Oracle and Microsoft under the following headings: History and evolution of the products, Target Market, Functionality, Customers, Future Directions, and any other areas. Any inforamton would be appreciated
    7. 22 Dec 2002 at 06:06


      Hi ,

      I'm using resultset in oracle and vbscript as it was mentioned here as follow:

      create a package that return a ref cursor,execute the package in vbscript and get the resultset into the
      recordset .
      Sometime it works and othertime I get that error in the line when I call the execute to the procedure:

      OraOLEDB error '80004005'

      Unspecified error .

      I used the example you gave in page :http://www.developerfusion.com/show/671/12/

      Please help me
    8. 01 Jan 1999 at 00:00

      This thread is for discussions of Oracle8 and Oracle8i.

    Leave a comment

    Sign in or Join us (it's free).

    Wrox Press
    AddThis

    Related discussion

    Related podcasts

    • Java Posse #213 - Newscast for Oct 23rd 2008

      Newscast for Oct 23rd 2008 Fully formatted shownotes can always be found at http://javaposse.com The Android project has been released as open source, beating the rumored launch date for the source code by several months http://source.android.com/ And, Gizmodo and ZDNet both offer in-depth ...

    Events coming up

    Want to stay in touch with what's going on? Follow us on twitter!