oracle全托管驱动Oracle.ManagedDataAccess
2016-12-23 09:22
337 查看
Download ODP.NET, Managed Driver .zip file to a directory for staging the install.
Unzip the download to expand its contents into the target directory.
Run configure.bat to GAC and configure machine.config for ODP.NET, Managed Driver.
Create a new Visual Studio 2010 console application project for C#.
Add Oracle.ManagedDataAccess.dll as a reference to the project.
Replace the contents of Program.cs with the following C# code. Notice that the namespace of ODP.NET, Managed Driver (Oracle.ManagedDataAccess.*) is different from the namespace of ODP.NET, Unmanaged Driver (Oracle.DataAccess.*).
Unzip the download to expand its contents into the target directory.
Run configure.bat to GAC and configure machine.config for ODP.NET, Managed Driver.
Create a new Visual Studio 2010 console application project for C#.
Add Oracle.ManagedDataAccess.dll as a reference to the project.
Replace the contents of Program.cs with the following C# code. Notice that the namespace of ODP.NET, Managed Driver (Oracle.ManagedDataAccess.*) is different from the namespace of ODP.NET, Unmanaged Driver (Oracle.DataAccess.*).
// C# using System; using Oracle.ManagedDataAccess.Client; using Oracle.ManagedDataAccess.Types; namespace Connect { class Program { static void Main(string[] args) { try { // Please replace the connection string attribute settings string constr = "user id=scott;password=tiger;data source=oracle"; OracleConnection con = new OracleConnection(constr); con.Open(); Console.WriteLine("Connected to Oracle Database {0}", con.ServerVersion); con.Dispose(); Console.WriteLine("Press RETURN to exit."); Console.ReadLine(); } catch (Exception ex) { Console.WriteLine("Error : {0}", ex); } } } }
相关文章推荐
- ORACLE官方全托管驱动 Oracle.ManagedDataAccess 12.1.0.1.0
- oracle全托管驱动Oracle.ManagedDataAccess
- oracle全托管驱动Oracle.ManagedDataAccess
- Oracle.ManagedDataAccess.dll
- IBatisNet+Oracle.ManagedDataAccess打造无需安装oracle客户端和ODP即可连接oracle数据库
- Oracle.ManagedDataAccessDTC.dll加载不正确。
- PowerShell 调用 Oracle.ManagedDataAccess.dll
- Oracle.DataAccess 驱动使用因为SQL语句缓存报错问题解决办法
- FSharp 调用 Oracle.ManagedDataAccess.dll
- FSharp 调用 Oracle.ManagedDataAccess.dll
- [ASP.NET]使用Oracle.ManagedDataAccess的OracleParameter参数化和OracleDataAdapter模糊查询
- Oracle.ManagedDataAccess.dll
- {"未能从程序集“Oracle.ManagedDataAccess, OracleInternal.Common.ConfigBaseClass”。":"OracleInternal.Common.C
- C#连接Oracle数据库(直接引用dll使用-Oracle.ManagedDataAccess.dll)
- Oracle.ManagedDataAccess.dll 连接Oracle数据库不需要安装客户端
- System.Data.OracleClient 与Oracle.ManagedDataAccess.Client
- Oracle.ManagedDataAccess + EF的使用
- VS报错:Oracle.ManagedDataAccess.Client.OracleException: ORA-01461: 仅能绑定要插入 LONG 列的 LONG 值
- Oracle.ManagedDataAccess.dll 连接Oracle数据库不需要安装客户端
- Oracle.ManagedDataAccessDTC.dll 使用