Odac usage notes

Source: Internet
Author: User

Recently, you need to access the database in Oracle. To use using system. Data. oracleclient, you still need to install the Oracle client, but do not want to install the complete client. An odac is installed, which is Oracle. and then you can reference using Oracle. dataaccess. client. net compatibility is not as good as the classes provided by Microsoft, so system is used. data. oracleclient.

Find the directory where odac is installed and find ...... \ Network \ ADMIN folder. Because Oracle 11g is installed, there is a sample folder, copy the two files to the admin folder, and open tnsnames in notepad. ora changes the sample data to the data to be accessed, as shown in figure

TTT =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = **. *. **. **) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)

)

ThenProgramUse the connection string "Data Source = TTT; user id = sa; Password = sa;"; to access

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.