Oracle Client in Web application

Oracle Client in Web application

Postby delia.berar » Tue 06 Nov 2012 14:04

Hi,
could some give an example of how to connect to an Oracle DB from an ASP.NET web project using Oracle Client?
Thanks in advance.
delia.berar
 
Posts: 1
Joined: Tue 06 Nov 2012 13:51

Re: Oracle Client in Web application

Postby Shalex » Wed 07 Nov 2012 10:48

Please refer to http://www.devart.com/dotconnect/oracle/docs/?Tutorial_connection.html.
Notes:
1. The OCI mode (connection via Oracle client) is used when the Direct connection string parameter is set to false (by default, it is false).
2. You can open a connection in the OCI mode from an ASP.NET project in the same way as it can be done from console application.
3. Make sure that capacity (x86 or x64) of the web server, on which you deploy your ASP.NET application, coincides with the capacity of your Oracle client.
4. The TNS alias name can be found in the tnsnames.ora file of Oracle client (%OracleHome%\NETWORK\ADMIN\tnsnames.ora).
Shalex
Devart Team
 
Posts: 7608
Joined: Thu 14 Aug 2008 12:44

Re: Oracle Client in Web application

Postby matthiasramp » Tue 14 Apr 2015 10:47

Sorry for revoking this old post.
Does the tnsnames.ora have to reside in %OracleHome%\NETWORK\ADMIN\tnsnames.ora? Why is the TNS_ADMIN Environment-Variable not used?
I'm having a couple of issues usig a tnsnames.ora which resides in a different Folder than %OracleHome%\NETWORK\ADMIN\tnsnames.ora and it seems it is not used.

Regards
Matthias
matthiasramp
 
Posts: 12
Joined: Fri 22 Jan 2010 15:39

Re: Oracle Client in Web application

Postby Pinturiccio » Wed 15 Apr 2015 13:09

dotConnect for Oracle does not use tnsnames.ora directly. dotConnect for Oracle uses Oracle Client, which works with tnsnames.ora. By default Oracle Client looks for tnsnames.ora in the %OracleHome%\NETWORK\ADMIN\ folder. For Oracle Instant Client, the path to the tnsnames.ora file can be specified in the TNS_ADMIN environment variable. If you need more information about the locations of the tnsnames.ora file, please contact Oracle support.
Pinturiccio
Devart Team
 
Posts: 1953
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for Oracle