I am trying to connect a simple groovy script to a DB.
code:
import groovy.sql.Sql class GroovySqlExample2{ static void main(String[] args) { def sql = Sql.newInstance("jdbc:sqlserver://MYSERVERIP", "uname", "pwd", "net.sourceforge.jtds.jdbc.Driver") sql.eachRow("select * from word"){ println it.spelling + " ${it.part_of_speech}" } } }
I placed jtds-1.2.3.jar inside the C: \ groovy -1.6.3 \ lib folder, but the code above continues to complain:
java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
Drake source share