I’m trying to open an SQL instance within a driver which uses the DB2Driver from IBM.
The interesting part is that when I include:
def DB2Driver = new DB2Driver()
That initializes just fine.
But when I do
Sql.newInstance(info.getHost(), info.getConnectionMetaData().getParameterValue('username'), info.getConnectionMetaData().getParameterValue('password'), info.getConnectionMetaData().getParameterValue('driverClass'))
Or
Sql.newInstance(info.getHost(), info.getConnectionMetaData().getParameterValue('username'), info.getConnectionMetaData().getParameterValue('password'), 'com.ibm.db2.jcc.DB2Driver')
It will fail to open a SQL connection, saying that a suitable driver isn't found. How can I get the connection to DB2 to open?