By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,106 Members | 2,679 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,106 IT Pros & Developers. It's quick & easy.

Connecting to an Oracle Database using ASP

P: 11
Hi Oracle Gurus!!

Before I proceed, as per the moderators request, I would like to mention that I have already taken a look at the other threads pertaining to a similar issue which I am having and have not found a feasible answer. I would like to apologize if there is an answer out there (I've looked at quite a few threads).

So here is the situation:

Currently, I have been using Oracle Toad from Quest Software to connect to the production database to run all my sql queries without a problem. My objective now is that I would like to query all the sql via an ASP page instead of Oracle Toad.

After creating my asp page in C:\Inetpub\wwwroot with the following code:

<title> Time Check </title>
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection") ' This line creates the ActiveX Database Object

objConn.ConnectionString = "Data Source=GTMSP;User Id=PLATEAU;Password=abcde;Integrated Security=no"

objConn.Open 'This commands the database to open


I receive the following error when I run my page from http://localhost/asptestpa.asp -

Error Type:
Microsoft OLE DB Service Components (0x80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
/asptestpa.asp, line 20

Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Guidant; .NET CLR 1.0.3705; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727)

GET /asptestpa.asp


Here are the configurations I have made on my machine:

(1) I went to the Microsoft ODBC Administrator and added a DSN with the following attributes under the User DSN and System DSN tab :

DataSource Name: GTMSP
Description: GTMS Production
Username: PLATEAU

(2) Under the file DSN tab in Microsoft ODBC Adminstrator, I included GTMSP.dsn

(3) I know I have Ora9 components because I am able to successfully connect via Oracle Toad (thats how I do all my queries ex. Select * from pa_student...) using the following properties in Oracle Toad:

User/Schema: PAGGARWA
PASSWORD: *******
Connect Using Ora9

Note: I am also able to successfully connect using SQL* Plus

Note2: Initially I had the windows components error message (Oracle 0x80004005) but after speaking to the developers on our team, they mentioned that I already have the windows components.

Note3: I did install IIS on my machine and our developers told me that you can easily connect using .asp pages to the database from my machine. I do not need to have access on the production database to connect (which makes sense)

Final note: From one of the other threads, I took a look at for assistance for which my asp code is coded/constructed the way it is.

Any assistance is GREATLY appreciated. I have a report for senior management to turn in very shortly and without being able to connect to the database I can't query!!

I look forward to hearing from you soon. I'll be checking this site often for responses. Thank you
Aug 9 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.