I'm trying to write a .Net 4.7.2 console app that connects with an Oracle database using the Managed driver in VS 2019. I've added the Oracle.ManagedDataAccess v19.6.0 package to my project via the PacketManager. Following along with the Oracle Data Provider for .Net Developers guide's simple example, I get an exception when I open the connection, "Input string was not in a correct format.". Here's my code, any help would be appreciated.
using Oracle.ManagedDataAccess.Client;
public static void TestOracleConnection()
{
try
{
string connString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.xxx.xxx.xxx)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=Test)));User Id=user;Password=password;";
OracleConnection conn = new OracleConnection(connString);
conn.Open();
conn.Dispose();
}
catch (Exception ex)
{
}
}