I am trying to connect to MS Sql 2005 DB from SoapUI using Groovy script.
import groovy.sql.Sql
sql = Sql.newInstance("jdbc:jtds:sqlserver://servername\\inst1/databaseName",
"username", "password", "com.microsoft.sqlserver.jdbc.SQLServerDriver")
Error: No suitable driver found for jdbc:jtds:sqlserver://32esx802\inst1/tlMain
I have tried to use "net.sourceforge.jtds.jdbc.Driver" but i still get the same error
Please let me know what i am doing wrong.
Thanks
I had the same problem and looks like I am getting closed. I did everything as stated above but getting following exception- java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
Found the answer
first remove "jtds" from the connect string, so the syntax will look like
Once this is fixed another error came up. I got a timeout error. Based on the original post there seems to be some weird conflict between Groovy sql and MS sql. to work around this remove the databaseName and the database reference in the sql statement. So the sql syntax will look like.
also if you have error stating that could not find
com.microsoft.sqlserver.jdbc.SQLServerDriver
make sure you downloadsqljdbc.jar
from Microsoft site and place it inC:\Program Files\eviware\soapUI-3.6.1\lib
and restart SoapUI.Try Adding the following lines to the beginning of your script.