Traversing To and Fro with SQL Server Based Java Applications using NetBeans IDE
This series introduces you to a step-by-step process for developing Java (or JFC) based applications with Microsoft SQL Server as the database, using NetBeans IDE. In this article (which is the last in this series), I shall introduce you to traversing through a set of rows more efficiently. This will be a bit different from any of the articles in this series.
Traversing To and Fro with SQL Server Based Java Applications using NetBeans IDE - The source code for buttons (Page 4 of 5 )
This section shows you the source code to walk (or jump) through the rows in all directions. Copy the following code at the appropriate "ActionPerformed" events:
This is quite essential if you need to move freely in any direction. According to the above statement, I also declared the result set to be read-only. That means it cannot be modified by the user any more. Since our design is not for modifications, I used it. But you can't use it if you need the result set to be updatable.