Forum Discussion
electric_Insura
14 years agoContributor
I have a Groovy script step that registers the JAR files at the beginning of all tests that require JDBC connections.
I run the step before I have to make any connections. If I don't run it, I get a "failed to init connection" error every time.
The following script registers the jTDS driver.
I also use the SQL server name, NOT the IP address, in my connection string. Your DBA should be able to give you the name of the SQL server and its connection port.
My connection string looks like this:
jdbc:jtds:sqlserver://nameofSQLserver:portNumber;domain=nameofDomain;trusted_connection=yes
I run the step before I have to make any connections. If I don't run it, I get a "failed to init connection" error every time.
The following script registers the jTDS driver.
import groovy.sql.Sql
com.eviware.soapui.support.GroovyUtils.registerJdbcDriver( "net.sourceforge.jtds.jdbc.Driver" )
I also use the SQL server name, NOT the IP address, in my connection string. Your DBA should be able to give you the name of the SQL server and its connection port.
My connection string looks like this:
jdbc:jtds:sqlserver://nameofSQLserver:portNumber;domain=nameofDomain;trusted_connection=yes