Oracle 12C and the Oracle .Net DataProvider

Getting weird errors connecting to Oracle after upgrading to 12C?

Try changing

DataTable data;
using (OracleConnection conn = new OracleConnection(_connectionString))
{
conn.Open();
}

to

DataTable data;
using (OracleConnection conn = new OracleConnection())
{
conn.ConnectionString = _connectionString;
conn.Open();
}

Getting an error with the TNS name not being found? Make sure it is the same name as the SERVICE_NAME and it should work.

PCPLIVE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = PCPLIVE)
)
)

Leave a Reply

Your email address will not be published. Required fields are marked *