473,836 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error to connect ASP page to Oracle

My machine is Windows XP with Oracle 9.2 Home; IIS and Oracle
are in the same box.

I have tried both Oracle OLEDB Provider and Microsoft ODBC For Oracle,
but both not working.

For Microsoft ODBC For Oracle approach, I added a data source
in Oracle Data Source Administrator, in System DSN tab, I created
a system data source named OracleDSN with Microsoft ODBC for Oracle.

I got the following errors for ASP page connect to Oracle database.
However, it works fine for VB application connect to Oracle database
with the same data source.
Approach #1: Oracle OLEDB Provider
=============== =============== ====

cst = "Provider=MSDAO RA;" & _
"Data Source=ORCL;" & _
"User ID=scott;" & _
"Password=tiger ;"

Error Type:
Microsoft OLE DB Provider for Oracle (0x80004005)
Oracle client and networking components were not found. These
components are supplied by Oracle Corporation and are part of the
Oracle Version 7.3.3 or later client software installation. Provider is
unable to function until these components are installed.
Approach #2: Microsoft ODBC For Oracle
=============== =============== ========

cst = "dsn=OracleDSN; uid=scott;pwd=t iger;"

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on
Here's the ASP code:
Set objConn = Server.CreateOb ject("ADODB.Con nection")

'Approach #1: Oracle OLEDB Provider
cst = "Provider=MSDAO RA;" & _
"Data Source=ORCL;" & _
"User ID=scott;" & _
"Password=tiger ;"

'Approach #2: Microsoft ODBC For Oracle
'cst = "dsn=OracleDSN; uid=scott;pwd=t iger;"

objConn.Open cst

Set objRs = objConn.Execute ("SELECT * FROM DEPT")
Response.Write "<table border=1>"
For I = 0 To objRS.Fields.Co unt - 1
Response.Write "<tr>"
Response.Write "<td><b>" & objRS(I).Name & "</b></td>"
Response.Write "</tr>"
Response.Write "</table>"

any ideas? please advise.


Sep 22 '05 #1
5 13220
Did you configure OracleNet for the client or in other words
tnsnames.ora file?

My suggestion would be to create a service name using Oracle Net
Manger. Then in ODBC (Administrative tools) -> DSN -> System tools
create Data Source Name by clicking add. Select the driver for Oracle.
Then provide necessary information including the service name u created
using Oracle Net Manger, login & password. Then test the connection...


Asim Abbasi
Takveen, Inc.

Sep 22 '05 #2
jr********@hotm ail.com wrote:
Approach #1: Oracle OLEDB Provider
=============== =============== ====

cst = "Provider=MSDAO RA;" & ...
This is not the Oracle OLEDB provider. See the MS at the beginning of
MSDAORA? It stands for Microsoft, which is why your error message reads:
Microsoft OLE DB Provider for Oracle (0x80004005)

Use the actual OLEDB provider from Oracle. You might find this useful:

But there's a more foolproof way. Use the .UDL trick:

Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Sep 22 '05 #3
Dave is right. What you are doing here is using the Microsoft Driver
for Oracle. This is not oracle objects for OLE, in which case your
Provider becomes "OraOLEDB.Oracl e".
You might wanna try the ODBC approach as well, of course after you
configure the Oracle Net names. First of all, make sure you are able to
connect to Oracle, using any tool like SQLPlus., then go further.
Install the Oracle ODBC driver for your oracle version on your PC
running IIS, and configure a DSN using the ODBC Administrator. You can
also test the connection from the ODBC Administrator tool after you
create your connection and make sure that everything is right...

Brijesh Mathew

Sep 22 '05 #4
More questions to clarify...

1) In ODBC Data Source Administrator, in System DSN tab, when
I add a new data source, I will see the list of data source.
"Oracle in OraHome92" actually means Oracle ODBC Driver 9.2?

2) ODBC Data Source Administrator only shows the list of
ODBC drivers, we couldn't see any OLE-DB Providers in the list.
For OLE-DB Providers, we can see that when using UDL trick.
Is that correct?

3) For ASP application to connect to Oracle database,
which of the following is the best driver to choose? Why?
How do we choose? My understanding is that OLE-DB is better
than ODBC. Is that correct? Is that because we don't need
to setup DSN in ODBC Data Source Administrator?

Microsoft OLD DB Provider for Oracle
Oracle Provider for OLE-DB
Oracle ODBC
Please advise more... thanks!!

Sep 22 '05 #5
1) Yes. If you see Oracle in Orahome92 in ODBC Administrator, that
means you have the Oracle ODBC Driver Installed.
2) You will not see Oracle OLE DB Providers in the list of ODBC
drivers, as it is not an ODBC Driver. First of all, you should
understand the fact that you should use ODBC driver in a scenario where
you do not have any other choices. If you have a better Driver to
connect to the DB, always use that..!
3) OLE DB is always better than ODBC by all means. With ODBC, you will
be restricted to only certain DB specific tasks unlike the OLE DB
driver. Speedwise, from my experience, OLE DB is always been better.
Check that you have Oracle OLE DB drivers installed. Goto oracle
universal installer, and in the section Oracle Programmer, you will see
Oracle OLE db.
Configure your tnsnames before you do anything. Make sure you are able
to connect to Oracle from SQLPlus, or any other tool. If you are using
ODBC, while you create a DSN, you will see an area where you have to
specify TNS service name. Create this tnsname and make sure you are
able to connect to DB, then proceed.
Whatever drivers you are using, be it ODBC, or MSDAORA, or Oracle OLE
db Provider, you need the net service name to connect to DB.
Hope that helps

Brijesh Mathew

Sep 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: cschang | last post by:
My system is on a NT4 (w/SP6a) running IIS 4. I am developing a page that query one record from my Oracle DB 8.1.6 on a separate machine. I am using the MS ODBC for Oracle drive. In my ASP page I have (Connection object has been crreated.) then.. LnDetail = "{ call IPV$po.getPOLine(?,?, {resultset 1, "& _ " p_orderType, p_orderID, p_reqNum, p_nsn, "& _ " p_reqStatus, p_priceStatus, p_errFlag, p_errMsg})}"
by: Gabo | last post by:
Hello, I have a VB front end program that connects to an Oracle backend db. Nothing has changed on either end; however, when I try to connect to the db via VB program I receive a requires OLE DB Session Object. The SQL error I receive is: Tns error struct: nr err code: 0 ns main err code: 12560
by: Cherrish Vaidiyan | last post by:
hello, Thanx for the suggestions on my Listener query. Now i am performing a simple work.. STANDBY DATABASE creation. I have followed the instraction from Oracle 9i Release 1 documentation but have some doubts. here are the basic stpes i followed. 1 Either make a new backup of the primary database datafiles or access
by: Vijai Kumar | last post by:
Hi, I am using jsp page to connect to oracle database. We are using a Borland Enterprise Server 5.2 application server and a web server running on IIS 6.0. A GUI module is hosted on the web server. When we use the logon.jsp page to connect we get the following error Error Logging On : java.sql.SQLException: ORA-00600: internal error code, arguments: , , , , , , , Can you please kindly advice what needs to be done.
by: sreejith.ram | last post by:
I did google & search in this group , but couldnt find any thing related to this. This is my first attempt to connect GridView to a Oracle database via SqlDataSource. I am receving error message "OCIEnvNlsCreate failed with return code -1 but error message text was not available" Any one seen this or anything similar? Thank you in advance for all tips,suggestions,advices & helps
by: CJM | last post by:
I have a working web application (ASP) which links to an Oracle 10g DB via OO4O. I'm trying to port it to either of two test servers, but in fact, I can't get it to work with either - 'Unable to make connection, ORA-12154: TNS:could not resolve the connect identifier specified'. This error occurs in the applications global.asa file where I'm trying to set up a connection pool: <object runat="Server" scope="Application" id="oSession"...
by: hakiran | last post by:
Hello all, I have been using Perl DBI the last 6months or so. I use it extensively with MySQL. But recently i tried to access Oracle DB with it and was having trouble. Any help would be appreciated. Here is the code and the error i get. I know the table/view do exist. Thanks all Kiran ----------
by: devas | last post by:
Hai, Issue: I am using OEM 10g grid control. I want to establish the connection from oracle to sql server=>I canít able to connect it. Please help me I have created the system dsn below steps. Step 1) Open the odbc data source administrator Step 2) select the system dsn tab page. And gave the dsnname Step 3) configure the server and tested the connection Step 4) connection has COMPLETED SUCCESSFULLY!
by: drylio | last post by:
Hello, I have one problem. I installing oracle 8.1 with apache (Oracle http server powered by apache, windows 2000 professional) and configure them, but i misunderstand why can't change erros 'Authorization Required' text. 1. Creating directory error in c:\oracle\oracle8\apache 2. Creating .htaccess file. Put the text ErrorDocument 401 error\401.html 3. Creating error page 401.html 4. Put files 401.html and .htaccess into error...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Duprť who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.