chiragverma123
9 years agoContributor
Getting no response when I run the following database connection script from Groovy[Soapui]
I am trying to run this script from Groovy[soapUI] but i am not getting errors and not the sql command is not returning any results. am I missing anything crucial here? import groovy.sql.Sql ...
- 9 years ago
The above code is correct. Just added the code below:
// instead of this
st.executeQuery(sql)// do something like
java.sql.ResultSet rs = st.executeQuery(query);and then iterate results as described here - https://docs.oracle.com/javase/tutorial/jdbc/basics/processingsqlstatements.html#processing_resultset_objects
while (rs.next()) {
String value = rs.getString("COLUMN_NAME");
log.info("COLUMN_NAME:"+value)
}