Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access oracle database through ASP

Status
Not open for further replies.

maswien

Technical User
Joined
Sep 24, 2003
Messages
1,286
Location
CA

We have an ASP code that calling a oracle procedure on the database server, it works on most the machines in the office, only for one machine, the access failed, can anybody give me some advice on this issue?

The connection string is :

"provider=msdasql;dsn=newdb;uid=system;pwd=manager;"

The Microsoft ADO component should be installed when the OS is setup by default, right? Is any possibility that the ADO component for ORACLE is missing?

Thanks
 
As far as I know, ADO has never inherently included the ability to access Oracle by any method (ODBC, OLE DB or .NET). In all cases, the Oracle client software (from an Oracle install) must be present on the machine.

Mark [openup]
 
Just to add, when you mention an ASP application, and "the machines in the office", you mean that these machines are all acting as web servers, right? All the stuff I said above applies to the web server only - the web clients don't need anything except a browser.

Apologies if this is obvious.

Mark [openup]
 

yes, all are web server, also on the problematic server,
there is a error message comes up when trying to connect to the database:

" the oracle(tm) client and networking components were not found. these components are supplied by ORACLE corporation and are not part of the ORACLE Version 7.3(or greater) client software installation"

Any idea?

 
Yes - then you need to install the Oracle client software, as supplied by Oracle. Basically, if you can run a command line sqlplus on the machine, and successfully connect to the db you need, using the username, password and database in the connection string, then your ADO code will work as well.

The client software you need depends on the version of the Oracle database you are trying to connect to. Oracle state that their stuff is backward compatible with any database they still support, which might suggest that you want to install the latest version available. In practice, you might want to install the same version as is on the machines which work, and copy the tnsnames.ora file and sqlnet.ora file from those machines to the problematic machine.

The client software should be on the disks for the ORACLE database server software, or you can download it (though I think then you end up downloading the whole RDBMS system) from Oracle.com



Mark [openup]
 

But the odbc tools not using the ADO component can access the database on this web server, that's why I'm guessing it need the ADO component, but like I wrote in the previous comment, the ADO stuff should be included in the OS install, I think, I'm not sure here.

 
OK - I did not realise you could access the db from the machine at all. It is unusual that the error message about installing Oracle client comes up - I would check the sqlplus idea I mentioned above as first port of call.

In the case where it is the ADO at fault, you need to ensure that the same version of MS ADO is installed on the web server as is on other machines which work. Again, ADO should be backward compatible, but there were functions in 2.5 which were not in 2.6, and again the same in 2.7, I seem to remember. You are correct - a certain version of ADO will come with the OS, but service packs, etc can install newer ones.

Unfortunately, figuring out what version of ADO is actually installed on the working machines is not that easy. You might need to do a google search like "determine which version of ADO is installed", but I had real problems with this a couple of years ago.

Another option would be not to use a DSN connection, but I'm not sure if this will make any difference to you.

Mark [openup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top