JDBC.NET
JDBC.NET copied to clipboard
C# JdbcConnectionStringBuilder Errors in Provided Example
DriverPath, DriverClass and JdbcUrl from the provided example generate CS0103, name does do not exist in current context, compilation errors.
Got passed this error only to be confronted with the com plus 532462766 exception code when I go to create the connection.
I am trying to connect to an Oracle database
Would you be able to provide example code?
static void Main(string[] args)
{
var Tbuilder = new JdbcConnectionStringBuilder { DriverClass = "oracle.jdbc.driver.OracleDriver", DriverPath = "C:\\Users\\DEV101\\ojdbc11.jar", JdbcUrl = "jdbc:oracle:thin:@ldap://oracleServer.corp:1510/DevDB,cn=oraclecontext,dc=world;UID='DEV101';PWD='qx3Wz>uc%xlz'" };
var Tprops = new JdbcConnectionProperties{{ "User", "Dev101" }, { "Password", "qx3Wz>uc%xlz" } };
using JdbcConnection Tconnection =new JdbcConnection(Tbuilder,Tprops);
Tconnection.Open();
Tconnection.Close();
}
Fails on using JdbcConnection Tconnection =new JdbcConnection(Tbuilder,Tprops)