Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 56,312 times

Contents

Related Categories

Oracle8 and Oracle8i - Connecting to an Oracle database

Wrox

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.


    Copyright © Wrox Press Limited 2001; all rights reserved.

    No part of this chapter may be reproduced, stored in a retrieval system or transmitted in any form or by any means -- electronic, electrostatic, mechanical, photocopying, recording or ot

    Comments

    • Master detail using ASP

      Posted by pjarvis on 16 Mar 2004

      How can I create a master detail web form using ASP, ADO, vbscript, and HTML?[email="pjarvis@anteon.com"]email me[/email]

    • HELP!!!

      Posted by tckk75 on 02 Dec 2003

      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...

    • How to use .NET, Oracle with Unicode datatype (nch

      Posted by tcanvn on 19 Jun 2003

      Hi,
      I using [b].NET[/b] to access [b]Oracle DB[/b] (with [i]OLEDB Provider for Oracle[/i]) but I have a trouble that I couldn't use [b]Unicode datatype[/b] (such as: [b]NCHAR, NVARCHAR2[/b]).
      ...

    • deleting rows in listview control

      Posted by gonzo on 24 Feb 2003

      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 con...

    • College Project

      Posted by goughi on 24 Feb 2003

      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 e...