/** * Returns the parameter type. java.sql.Types.VARCHAR is returned if the data type is not known. * * @param param the column index (1,2,...) * @return the data type */ public int getParameterType(int param) throws SQLException { try { debugCodeCall("getParameterType", param); ParameterInterface p = getParameter(param); int type = p.getType(); if (type == Value.UNKNOWN) { type = Value.STRING; } return DataType.getDataType(type).sqlType; } catch (Exception e) { throw logAndConvert(e); } }
/** * Returns the Java class name of the parameter. "java.lang.String" is returned if the type is not * known. * * @param param the column index (1,2,...) * @return the Java class name */ @Override public String getParameterClassName(int param) throws SQLException { try { debugCodeCall("getParameterClassName", param); ParameterInterface p = getParameter(param); int type = p.getType(); if (type == Value.UNKNOWN) { type = Value.STRING; } return DataType.getTypeClassName(type); } catch (Exception e) { throw logAndConvert(e); } }