Connect JDBC Driver - Websphere

This is a discussion on Connect JDBC Driver - Websphere ; After using WebSphere ConnectJDBC Driver my application cannot perform login action, the error message is: [8/9/07 10:52:40:352 ICT] 00000031 SystemOut O java.sql.SQLException: [IBM][SQLServer JDBC Driver]Unsupported method: ResultSet.first But if I use OPTA driver as my JDBC driver the action login ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Connect JDBC Driver

  1. Connect JDBC Driver

    After using WebSphere ConnectJDBC Driver my application cannot perform login action, the error message is:

    [8/9/07 10:52:40:352 ICT] 00000031 SystemOut O java.sql.SQLException: [IBM][SQLServer JDBC Driver]Unsupported method: ResultSet.first

    But if I use OPTA driver as my JDBC driver the action login perform successfully, and error in ResultSet.first. But unfortunately this driver not free to use and not ship inside WebSphere Application Server.

    Is there any related query to solve this problem?


    Thanks in advance for any step to take.



    Azmi

  2. Re: Connect JDBC Driver

    azmi_V@yahoo.co.uk wrote:
    > After using WebSphere ConnectJDBC Driver my application cannot perform login action, the error message is:
    >
    > [8/9/07 10:52:40:352 ICT] 00000031 SystemOut O java.sql.SQLException: [IBM][SQLServer JDBC Driver]Unsupported method: ResultSet.first
    >
    > But if I use OPTA driver as my JDBC driver the action login perform successfully, and error in ResultSet.first. But unfortunately this driver not free to use and not ship inside WebSphere Application Server.
    >
    > Is there any related query to solve this problem?
    >
    >
    > Thanks in advance for any step to take.
    >
    >
    >
    > Azmi


    Why does your code call ResultSet.first() ? Are you iterating over the
    ResultSet multiple times?

    What I typically do is get back the ResultSet, iterate over all rows,
    creating a POJO that represents each row, and stuffing them into a
    Collection object. Then close the ResultSet (and connection). This logic
    avoids calling ResultSet.first().

    'Course, I was writing this kind of code before ResultSet.first() was
    even part of the spec :-)

    Ken

  3. Re: Connect JDBC Driver

    Cos i've to check that the first message is correct and the amount of the message is large.
    For your purpose here's i attach my code related to this error.

  4. Re: Connect JDBC Driver

    azmi_V@yahoo.co.uk wrote:
    > Cos i've to check that the first message is correct and the amount of the message is large.
    > For your purpose here's i attach my code related to this error.


    Looks like you'll have to use the OPTA driver.

    BTW, you might want to look at a book about JDBC programming. One
    obvious issue in your code is that you do not close
    connections/resultsets in a finally{} clause. If an exception happens,
    you'll leak connections.

    Ken

  5. Re: Connect JDBC Driver

    I can't used OPTA driver since I have to purchase a new license.
    BTW I was wondering if there was a way to solve it without changing the source code, because previously while using the OPTA driver the code working properly.
    Is there any missing configuration related to my ConnectJDBC driver settings that I missed?? Attach resource.xml as information.
    I?d expect this method to be supported within the ConnectJDBC driver shipped inside WebSphere Application Server. So in my general opinion ResultSet that are scrollable can?t be supported within ConnectJDBC driver.


+ Reply to Thread