Oracle's official fully managed drive oracle.manageddataaccess 12.1.0.1.0

Source: Internet
Author: User
Tags oracleconnection

Before using Oracle, you have to install his bloated client, although the Internet also provides direct-to-Oracle driver, but also to charge, recently Oracle finally enlightened, provide the official full-managed drive.

This is the Oracle all-managed driver included with the Oracle ODAC 12c release package, and Oracle has released two beta versions of the fully managed driver, but some problems have been identified in the test, and the 12.1.0.1.0 of this release Seems to have been released the official version, after a simple test, the last version of the bug I encountered has been fixed, there is no new problems found, recommend everyone to use.

: http://www.oracle.com/technetwork/topics/dotnet/downloads/index.html

Method One:

123456789101112131415161718192021222324252627282930313233343536373839404142 using System; using System. Collections. Generic; using System. Linq; using System. Text; using Oracle. Manageddataaccess. Client; using Oracle. Manageddataaccess. Types; namespace ConsoleApplication1 { class Program    { static void Main(string[] args) /c10>         { string strconn = "User id=test;password=test;" + "Data source= (description= (address= (protocol=tcp) (host=192.168.120.1) (port=1521)) (C Onnect_data= (server=dedicated) (SERVICE_NAME=ORCL))); " + "Pooling=false;" ; using (oracleconnection con = new oracleconnection( C16>strconn))             { con. Open(); string strsql = "SELECT * from the USERS order by ID"; oraclecommand cmd = new oraclecommand(strsql, Con); oracledatareader reader = cmd. ExecuteReader(); While (reader. Read())                 { string Line = "";                      for (int i = 0; Span class= "crayon-v" >i < reader. Fieldcount; i++)                     {Line += Reader.getname (i) tostring ( + "=" + reader.getvalue (i) tostring ( +                     } Console. WriteLine(line);                 }            } Console. ReadLine();         }    }}

Method Two:

Modify the connection string to

123 string strconn = "User id=test;password=test;" + "Data source=192.168.120.1:1521/orcl;" + "Pooling=false;" ;

This is a simple notation, but it doesn't work if you have multiple addresses.

Method Three:

In the downloaded oracle.manageddataaccess package, there is a Tnsnames.ora file under the \network\admin\sample directory, modify the listener information for this file configuration database, and copy the file to the application root directory.

123 string strconn = "User id=test;password=test;" + "Data source=test;" + "Pooling=false;" ;

Oracle official full-managed driver oracle.manageddataaccess 12.1.0.1.0

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.