JDBC.NET icon indicating copy to clipboard operation
JDBC.NET copied to clipboard

C# JdbcConnectionStringBuilder Errors in Provided Example

Open pflores429 opened this issue 1 year ago • 5 comments

DriverPath, DriverClass and JdbcUrl from the provided example generate CS0103, name does do not exist in current context, compilation errors.

pflores429 avatar Jan 03 '24 22:01 pflores429

Got passed this error only to be confronted with the com plus 532462766 exception code when I go to create the connection.

pflores429 avatar Jan 04 '24 00:01 pflores429

I am trying to connect to an Oracle database

pflores429 avatar Jan 04 '24 00:01 pflores429

Would you be able to provide example code?

tcables avatar Jan 04 '24 20:01 tcables

   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();
    }

pflores429 avatar Jan 04 '24 21:01 pflores429

Fails on using JdbcConnection Tconnection =new JdbcConnection(Tbuilder,Tprops)

pflores429 avatar Jan 04 '24 21:01 pflores429