Forum Discussion

canpan14's avatar
canpan14
Occasional Contributor
10 years ago
Solved

Cannot Connect to Oracle RDB Database

I'm trying to connect to an Oracle RDB Database which is not one of the listed databases. I have the driver for it and put it in the bin/ext folder. After trying to fill out the information in JDBC ...
  • canpan14's avatar
    canpan14
    10 years ago

    Got it to work with:

     

    import  oracle.jdbc.driver.OracleDriver
    import groovy.sql.Sql
    
    com.eviware.soapui.support.GroovyUtils.registerJdbcDriver("oracle.rdb.jdbc.rdbThin.Driver")
    sql = Sql.newInstance("jdbc:rdbThin://servername:port/dbname","username","password")
    def query = "select * from table"
    def res = sql.rows(query)
    
    log.info res[0]

    Looks like I needed the register JdbcDriver part for it to work properly!