Forum Discussion

deepsteve's avatar
13 years ago

Error retrieving sql date results

I'm having trouble retrieving date results back from a sql query in one of my script assertions. Any help would be greatly appreciated. I'm using SoapUI 4.0.0 on Windows XP. Here's the error:

com/ibm/db2/jcc/a/b.a([BIILjava/lang/String;Lcom/ibm/db2/jcc/DBTimestamp;Ljava/util/Calendar;)Ljava/sql/Timestamp;

Here's an example of a script that causes this error (connection details obfuscated):

import groovy.sql.Sql

def dbUsername = '******'
def dbPassword = '******'
def dbDriver = 'com.ibm.db2.jcc.DB2Driver'
def dbConnection = 'jdbc:db2://localhost:50000/******'

com.eviware.soapui.support.GroovyUtils.registerJdbcDriver(dbDriver)
def sql = Sql.newInstance(dbConnection, dbUsername, dbPassword, dbDriver)

// This works:
def result = sql.rows("select city_name from address")

// This doesn't work:
def result2 = sql.rows("select end_dt from address")

// This also doesn't work:
def result3 = sql.rows("select * from address")
No RepliesBe the first to reply