News

Showing posts with label db. Show all posts
Showing posts with label db. Show all posts

Monday, May 7, 2007

Make Your ASP Work With An Oracle Database

Oracle is one of the most popular databases in the world, also Active Server Pages (ASP) is a powerful server-side scripting language widely used to build dynamic Web pages. There are many ASP developers who wonder if they can use the ASP technology with Oracle database to build a web application, E-commerce and E-business web sites or internet management systems. The answer is YES! You can access Oracle using VB to create Oracle Applications as well. Here, I will discuss with you how to use ASP dealing with Oracle data.

Before we start, there are a few things you need to know. The Oracle Objects for OLE (OO4O) method is one of them. The OO4O is an Oracle middleware that allows native access to Oracle from client applications using the Microsoft Object Linking and Embedding (OLE) standard. Some of you may think that the ODBC can be used. Surely, you can use the standard database access method developed by Microsoft Corporation to access Oracle, but in my opinion the OO4O is better than ODBC because the OO4O is thread safe and provides full support for PL/SQL. PL/SQL stands for Procedural Language/SQL. It is an Oracle extension of the SQL statement set which allows the developer to impose flow control and logic design onto unstructured SQL command blocks. If you have fully installed Oracle8i, I am sure the OO4O is there for use already. If not, you can download it from Oracle web site.

The other thing is, we need know two objects and one interface that Oracle developed for Visual Basic Development, OraSession and OraDynaset objects, and OraDatabase interface. The OraSession object manages collections of OraDatabase, OraConnection, and OraDynaset used within an application. It is the object created by the CreateObject ASP and not by an OO4O method. The OraDatabase interface represents a user session to an Oracle database and provides methods for SQL and PL/SQL execution. Each of them has some of properties, and methods. For instance, the OraDynaset has some of properties, such as BOF, EOF, Bookmark, Connection, and so on, and ten methods, such as AddNew, Update, Delete, Edit, Refresh, Clone, and so on.

Now, let's start working on Oracle data using ASP technology.

Source: ASP 101

How To Troubleshoot an ASP-to-Oracle Connectivity Problem

This article outlines some of the common steps to take when you troubleshoot a problem with a connection to an Oracle Database from an Active Server Pages (ASP) application. Some of the more common error messages are:

Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Oracle][ODBC][Ora]ORA-12154: TNS:Could not resolve service name /vdir/filename.asp, line xxx.

-and-

The Oracle(tm) client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3 (or greater) client software installation.

You will be unable to use this driver until these components have been installed.

How to connect to Oracle

- ODBC,
- OLE DB, OleDbConnection (.NET)
- OracleConnection, Oracle Data Provider, ODP.NET

How to connect to an Oracle database by using ASP and ADO

This article discusses how to connect to an Oracle database by using a Microsoft Active Server Pages (ASP) page and Microsoft ActiveX Data Objects (ADO).

Source: Microsoft