Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Other Java > Java Databases
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Java Databases Discussion specific to working with Java Databases. For other Java topics, please see related Java forums. For database discussions not specific to Java, please see the Database category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 2nd, 2004, 10:55 AM
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Find a particular data using ResultSet

Dear Friends,

I'm using JDBC-Thin Driver to connect with Oracle, so is it possible that I can find a particular record by using ResultSet Object. For Example, I want to serach a record of student bearing registration # 45, so can I move the resultset cursor directly to 45. Please note that I also using the same resultset object as a scrolling one, mean I can move forward and backward too.

Looking forward to your reply..

Thankyou in advance

  #2 (permalink)  
Old April 5th, 2004, 06:34 AM
Authorized User
 
Join Date: Aug 2003
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

use a proper select statement..

like ;

select record from table where registration=45

  #3 (permalink)  
Old August 5th, 2004, 12:54 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , India.
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

If you want the single row output use HAVING or WHERE clause to the SQL
"Don't forget to move to hasNext()"
as mentioned above.

otherwise
get the resultset :: rs = executeQuery("Select * Student");

put in loop till u find the reg# = 45
while (rs.next()){
   if (#==45)
.
.
.
}






 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find out N/A data zeroffzero Excel VBA 3 August 25th, 2008 08:40 AM
Resultset error madhucm JSP Basics 0 August 4th, 2005 12:08 PM
Question in ResultSet.TYPE_FORWARD_ONLY viks Java Databases 1 March 27th, 2005 05:18 AM
Where will I find the data costorceroy BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 October 26th, 2004 05:23 AM
Find Common Data nbryson SQL Language 4 December 19th, 2003 05:25 AM



All times are GMT -4. The time now is 12:25 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.