alibaba82
17 years agoSuper Contributor
Groovy SQL.execute help
hello,
I have script which have a groovy script which updates information in the database. they look something like this
--------------------
import groovy.sql.Sql
//Retreive email value
def emailStep = testRunner.testCase.getTestStepByName( "Properties" )
Email = emailStep.getPropertyValue( "Email" )
//update database to lock account
sql = Sql.newInstance("jdbc:sqlserver://:1433;databaseName=;user=;password=;")
sql.execute()
------------------------------------------------------------------------------
These script were working fine. I tested the sql statement using groovyconsole and verified against the database if the update worked. However, this morning when I ran the scripts I received the following error and I cannot figure out what is wrong.
Thu May 31 10:57:17 PDT 2007:ERROR:java.sql.SQLException: No suitable driver
I checked the JavaHome\lib\ext and soapui\jre\lib\ext and they have the 'sqljdbc.jar file in them.
Thanks
Ali
I have script which have a groovy script which updates information in the database. they look something like this
--------------------
import groovy.sql.Sql
//Retreive email value
def emailStep = testRunner.testCase.getTestStepByName( "Properties" )
Email = emailStep.getPropertyValue( "Email" )
//update database to lock account
sql = Sql.newInstance("jdbc:sqlserver://
sql.execute(
------------------------------------------------------------------------------
These script were working fine. I tested the sql statement using groovyconsole and verified against the database if the update worked. However, this morning when I ran the scripts I received the following error and I cannot figure out what is wrong.
Thu May 31 10:57:17 PDT 2007:ERROR:java.sql.SQLException: No suitable driver
I checked the JavaHome\lib\ext and soapui\jre\lib\ext and they have the 'sqljdbc.jar file in them.
Thanks
Ali