Oracle Data Access Component (odac) Full name: Oracle Data Access Components
Advantage: because Microsoft is. in net framework4, system. data. oracleclient. DLL deprecated, and in terms of access efficiency and speed, system. data. oracleclient. DLL and Oracle. dataaccess. compared with DLL, Microsoft does not have the advantage of class libraries provided by Oracle, so I gave up using the system for many years. data. oracleclient. DLL, replaced by odp.net
1. odacInstallation
Server: 0racle10g, 11g
Client: oracle11g. I downloaded odac 11.2 release 4 and Oracle Developer Tools for Visual Studio (11.2.0.3.0). Oracle10g can be installed, but the corresponding custom objects are missing, and only support vs2003 and vs2005, so I chose to use oracle11g version odac 11.2 release 4 and Oracle Developer Tools for Visual Studio (11.2.0.3.0), http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
2.Environment variable settings
(1) Create ORACLE_HOME: odac installation directory (similar ~ APP \ Administrator \ product \. 1.0 \ client_1. The installation directory here is E: \ app \ LJP \ product \ 11.2.0 \ client_2)
(2) create LD_LIBRARY_PATH: % ORACLE_HOME %
(3) create tns_admin: % ORACLE_HOME % (the listener settings here should be tnsnames. ora directory. I set E: \ oracle \ product \ 10.1.0 \ db_1 \ Network \ ADMIN. Of course, you can also set the configured tnsnames. copy the ora file to the % ORACLE_HOME % directory)
(4) append at the beginning of path: % ORACLE_HOME %
3. Establish a connection with Oracle in vs2008
On the vs menu bar, choose View> server resource manager. On the server resource manager panel, right-click data connection and choose add connection.
Click "Change Data Source". In the "Change Data Source" dialog box that appears, select Oracle database, data provider, and Oracle date provider for. net ,:
Select the data source name from the drop-down list box of the data source name. The name is all configured in tnsnames. ora. Enter the user name and password and click OK to establish a connection between Vs and Oracle.
Finally, you can use the tool here to operate the Oracle database. For details about how to create complex custom object classes, see Chapter 14th ODT. Net tool basics of pro odp.net for Oracle database11g.