1

I'm using the version 1.2.5 of driver JTDS to access my SQLServer 2008 Database. When I execute:

        PreparedStatement pstmtQueryMessages=connection.prepareStatement(commandQueryMessages);

        pstmtQueryMessages.setString(1, project.getCreator());
        pstmtQueryMessages.setString(2, project.getName());

        ResultSet resultQueryMessage=pstmtQueryMessages.executeQuery();
        while(resultQueryMessage.next()) {
            String messageText=resultQueryMessage.getString(COLUMN_NAME_MESSAGE_MESSAGE);
            Date messageDate=resultQueryMessage.getDate(COLUMN_NAME_MESSAGE_DATE);
            Time messageTime=resultQueryMessage.getTime(COLUMN_NAME_MESSAGE_TIME);
        }

The following exception is thrown:

 java.sql.SQLException: The value supplied cannot be converted to java.sql.TIME
    at net.sourgeforge.jtds.jdbc.Support.convert(Support.java:653)
    at net.sourgeforge.jtds.jdbc.JtdsResultSet.getTime(JtdsResultSet.java:1140)

I was using the version 1.3.1 of Jtds and this conversion was working fine, but the Android API 19 wasn't responding very well to this version, and because that I'm using the older version. I don't know why this is happening in this version.

0 Answers0