Found an answer
first remove the "jtds" from the connection string, so the syntax will look like
sql = Sql.newInstance("jdbc:sqlserver://servername\\inst1/databaseName", "username", "password", "com.microsoft.sqlserver.jdbc.SQLServerDriver")
Once this was fixed, another error occurred. I have a timeout error. Based on the original post , there seems to be some strange conflict between Groovy sql and MS sql. to get around this, remove the database name and database link in the sql statement. This will look like sql syntax.
import groovy.sql.Sql sql = Sql.newInstance("jdbc:sqlserver://servername\\inst1", "username", "password", "com.microsoft.sqlserver.jdbc.SQLServerDriver") def row = sql.firstRow("select te.tDisplayName from dbName.TableName te where te.Column2=5000006") log.info(row.tDisplayName);
Also, if you have an error message that com.microsoft.sqlserver.jdbc.SQLServerDriver could not be found, be sure to download sqljdbc.jar from the Microsoft website and place it in C:\Program Files\eviware\soapUI-3.6.1\lib and restart SoapUI.
kumar source share