Open juniormayhe opened 6 years ago
This tutorial is in Portuguese because I am Brazilian. In this tutorial I am not using Dapper, but in my actual application I have used this configuration along with Dapper and it worked very well.
Blog: https://solitto.com.br/csharp/oracle-data-provider-net-core/ GitHub: https://github.com/alissonsolitto/ProviderOracle
That's the part that can help you.
We must define the environment variables to reference the Oracle Client .DLL. In the example below the Oracle Instant Client folder is located in "C: \ instantclient_12_2".
LD_LIBRARY_PATH = "C:\instantclient_12_2"
OCI_HOME = "C:\instantclient_12_2"
OCI_LIB_DIR = "C:\instantclient_12_2"
PATH = "C:\instantclient_12_2"
NLS_LANG = "PORTUGUESE_BRAZIL.WE8MSWIN1252"
The NLS_LANG variable is important for correct encoding of text fields.
I am having issues with this package. When Dapper tries to open connection (or I try to open it manually in debug mode), Visual Studio 2017 (under Windows 10) fires this exception:
So it seems CreateConnection method is firing an error.
Connection string:
Oracle client 12c is already installed here, other clients and software can connect to Oracle without any issues.
Not sure if this is related to environment variables. I have set all known oracle variables (TNS_ADMIN, ORACLE_HOME, ORACLE_BASE). I also had run Visual Studio as administrator but the exception keeps showing up.
The oracle platform seems to be really old and disheartening. :disappointed: