VS 2017 connecting Oracle 12
Because the data file that comes with Visual Studio cannot support more than 10g, you need an additional
Download Plugin
Native environment
Host Environment: Win7,visual Studio 2017
Download location
You can choose the version download location for Visual Studio
Http://www.oracle.com/technetwork/topics/dotnet/downloads/index.html
Download Vistual Studio Oracle Developer
ODAC for Visual Studio 2017
Installation
Install Please select the default
Registered
Please turn off Visual Studio on the current computer
After the installation is complete, the following path will be in the current system
C:\Program Files (x86) \oracle Developer Tools for VS2017
Enter path registration to visual Studio
C:\Program Files (x86) \oracle Developer Tools for Vs2017\odt
Double tap to
Test Connection Database
Please select---tool---connect to database
Select a managed driver
Connection mode
There are 2 ways to connect
Tns/ez Connection
Tns:
Write the data you want to connect to a file in advance, the connection only needs to enter the user name and password manually
C:\Program Files (x86) \oracle developer tools for vs2017\network\admin\Tnsnames.ora
EZ Connection:
All manual writes required
Accessing the database
You also need to introduce Oracle.ManagedDataAccess.dll DLLs in the current project to connect to the Oracle database
In the following path
C:\Program Files (x86) \oracle Developer Tools for Vs2017\odp.net\managed\common
If that's the case, the link succeeds.
The following tests are connected to Oracle
The official example
Finally, Oracle officially has example
In the following path
C:\Program Files (x86) \oracle Developer Tools for Vs2017\samples\odp.net.managed\4
And the examples are very clear.
Finally, as the author, I was about half a day, was the evil teacher, seduced my curiosity ...
I hope you can help you.
Good bye
Visual Studio 2017 connects Oracle