Oracle8 and Oracle8i

Summary

That just about brings us to the end of this guide to connecting to an Oracle database from an ASP application. We covered quite lot of ground here:

  • Installation and configuration of the Oracle8 client software, Net8
  • Using the Microsoft OLE DB Provider for Oracle
  • Using the Microsoft OLE DB Provider for ODBC
  • Using Oracle Objects for OLE (OO4O)
  • PL/SQL fundamentals
  • Creating a sample ASP application based on the scott account
  • Showing that it is possible to retrieve an ADO Recordset from an Oracle stored procedure, using both PL/SQL tables and reference cursors
  • Before we finish this chapter, take look at the chart below comparing  each of the common methods of data access for Oracle. I added an additional 7000 records to the emp table and then used each of the methods to retrieve these records and display them using an ASP script. Each method was executed three times and after each test I rebooted the server machine so that there would be very little chance of data being cached by either Oracle or the web server (for this test the web server also doubled as the Oracle database server to cut the time taken to shutdown and restart).


    In these tests, MSDAORA  was used with a standard SQL SELECT statement, as was the ODBC Driver for Oracle and OO4O, and finally I used the ODBC Driver for Oracle in conjunction with PL/SQL tables, and Oracle's Oracle Provider for OLE DB  with a reference cursors as just described. The Y-axis shows the amount of time taken to complete each test in seconds. I also monitored the CPU and memory usage and they were all very similar for each test.

    You can see that there is not that much difference between each method. When choosing which method to use, the underlying factor will always be good database design and coding practices.

    Don't forget that you can download all of the SQL and ASP scripts for this chapter from the Wrox web site at http://www.wrox.com.

    You might also like...

    Comments

    Contribute

    Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

    Our tools

    We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

    “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” - Martin Fowler