aspose file tools
The moose likes JDBC and the fly likes database connection Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "database connection" Watch "database connection" New topic
Author

database connection

prem kumar vadivelu
Greenhorn

Joined: Jul 30, 2010
Posts: 7
how to access or insert an value in a particular cell in a database using java code other that SQL.
we can access a column like rs.getString(1) lie this can we access a cell using java code
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5575

There is no way to access a column's value other than by submitting a SQL SELECT statement - you need a SELECT to fill the ResultSet.

Once you have the ResultSet and are working your way through the returned rows, you can update column values using the ResultSet.updateXXX(index,value) methods followed by the ResultSet.updateRow() method to commit the changes to the row. You can do a similar thing to insert new rows.

If you don't want to do this low level database handling, us a ORM tool such a Hibernate or JPA to hide these details from you.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: database connection
 
Similar Threads
Can we use Excel file as a database in java?
jdbc -access
Access
jdbc -access
Hierarchical Database