aspose file tools*
The moose likes JDBC and the fly likes accessing a row Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "accessing a row" Watch "accessing a row" New topic
Author

accessing a row

harivarma mudunuru
Greenhorn

Joined: Sep 07, 2000
Posts: 8
can I access a particular row from the database directly using jdbc?
Apu Nahasapeemapetilon
Ranch Hand

Joined: Sep 06, 2000
Posts: 51
Sure, JDBC will allow one to access a DB with all of the privileges of the User/Password that you use to connect to the DB.
Depending upon how you want to do it, create a PreparedStatement, set the SQL string property and the run the appropriate execute method. This will return a ResultSet that will contain the row you desire.
I can give you a short example iffin you need more info.
Eung maeng
Ranch Hand

Joined: Feb 10, 2002
Posts: 68
Please give me a good example as soon as possible.
cheers,
Paul
pmaeng@kaita.org.au
 
Consider Paul's rocket mass heater.
 
subject: accessing a row