0

I found this question: soapUI access MS SQL DB from groovy script but it refers to using the MS SQL driver.

So I'm following the instructions here: http://groovy.codehaus.org/Tutorial+6+-+Groovy+SQL I wrote the following groovy script to connect to my local database:

import groovy.sql.Sql
sql = Sql.newInstance( 'jdbc:jtds:sqlserver://thehl7:1433/agilejury-thehl_MC', 'user', 'password', 'net.sourceforge.jtds.jdbc.Driver' )
sql.eachRow( 'select * from pool_person' ) { println "$it.pool_id -- ${it.person_id} --" }

I was getting class not found, but I placed the jar file in my ext directory and got past that one. Now I'm getting java.sql.SQLException: No suitable driver found for jdbc:jtds:sqlserver://thehl7:1433/agilejury-thehl_MC.

Community
  • 1
  • 1
Thom
  • 14,013
  • 25
  • 105
  • 185

1 Answers1

0

I believe the answer was here even though I'm getting an entirely different message. SoapUI + sqlite-jdbc = ClassNotFoundException

I registered my jdbc driver and the error disappeared.

Community
  • 1
  • 1
Thom
  • 14,013
  • 25
  • 105
  • 185