chequer-io / JDBC.NET

It is a wrapper that allows you to use JDBC drivers in ADO.NET
MIT License
34 stars 10 forks source link

C# JdbcConnectionStringBuilder Errors in Provided Example #35

Open pflores429 opened 10 months ago

pflores429 commented 10 months ago

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

pflores429 commented 10 months ago

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

pflores429 commented 10 months ago

I am trying to connect to an Oracle database

tcables commented 10 months ago

Would you be able to provide example code?

pflores429 commented 10 months ago
   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 commented 10 months ago

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