Rupam Routh
Rupam Routh

Reputation: 11

sqlserver connection through groovy script

I want to make sql connection with windows authentication through sqlserverjdbc jar in SoapUI using groovy. Can anyone help me out, I'm getting an error -

source code -

import sqlserverjdbc.*;
def sql = Sql.newInstance("jdbc:sqlserver://servername/databasename","integratedSecurity=true","com.microsoft.sqlserver.jdbc.SQLServerDriver")

Error - groovy.lang.MissingPropertyException: No such property: Sql for class: Script7 error at line:2

Upvotes: 0

Views: 721

Answers (1)

tim_yates
tim_yates

Reputation: 171084

Assuming the driver is on the classpath, you just need to

import groovy.sql.Sql

Upvotes: 1

Related Questions