Hi everybody,
I'm having problems get columns and data rows of datetime value from DB and make it a rtdm table (data grid),
something is wrong in the get...() function syntex,
trying to run the code:
import org.apache.log4j.Logger
import java.sql.Connection
import java.sql.PreparedStatement
import java.sql.ResultSet
import java.sql.SQLException
import org.apache.commons.logging.Log
import org.apache.commons.logging.LogFactory
import com.sas.analytics.ph.common.RTDMTable
import com.sas.analytics.ph.common.RTDMTable.Row
import com.sas.analytics.ph.common.exp.SymbolTable
import com.sas.analytics.ph.common.jaxb.DataTypes
import com.sas.rtdm.implementation.engine.EventInfo
import javax.sql.DataSource
.
.
.
RTDMTable TABLE;
TABLE = new RTDMTable();
TABLE.columnAdd("stringcol", DataTypes.STRING, Collections.emptyList());
TABLE.columnAdd("floatcol", DataTypes.FLOAT, Collections.emptyList());
TABLE.columnAdd("datecol", DataTypes.DATETIME, Collections.emptyList());
.
.
.
/*get rows and columns by query from DB
stmt = conn.prepareStatement(queryToSubmit)
.
.
.
Row newRow = TABLE.rowAdd()
newRow.columnDataSet("stringcol", rs.getString(1))
newRow.columnDataSet("floatcol", rs.getDouble(2))
newRow.columnDataSet("datecol", rs.getDateTime(3))
.
.
.
--------
ERROR:
Caused by: groovy.lang.MissingMethodException: No signature of method: org.apache.commons.dbcp.DelegatingResultSet.getDateTime() is applicable for argument types: (java.lang.Integer) values: [3]
Possible solutions: getDate(int), getTime(int), updateTime(int, java.sql.Time), getDate(java.lang.String), getDate(int, java.util.Calendar), getTime(java.lang.String)
HELP 🙂 ?