The Artima Developer Community
Sponsored Link

Java Answers Forum
ResultSet problem

1 reply on 1 page. Most recent reply: May 24, 2002 11:11 AM by Master

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
sarvesh

Posts: 8
Nickname: shasija
Registered: Mar, 2002

ResultSet problem Posted: May 22, 2002 10:48 PM
Reply to this message Reply
Advertisement
how do i traverse data back and forth using ResultSet


Master

Posts: 7
Nickname: plut
Registered: Mar, 2002

Re: ResultSet problem Posted: May 24, 2002 11:11 AM
Reply to this message Reply
ResultSet rset = new ResultSet;

// Get info from database.. (Execute SQL statement)
// The returned resultset is traversed like this

while(rset.next() != null)
{
// Fetch data. (The first attribut in the current
// tuple)

String data = rset.getString(1);
}

// If you're using JDBC 2.0 or higher you may also go
// backwards.. (rset.previous() )


Check out this address where you may read about all
classes and their methods :

http://java.sun.com/products/jdk/1.2/docs/api/index.html

Have fun :)

Flat View: This topic has 1 reply on 1 page
Topic: JMenuItem.setText question. Previous Topic   Next Topic Topic: How do you draw a rectangle with dotted or hashed lines?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use