Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP NEEDED WITH READING DATA FROM AN EXTERNAL DB INTO A JTABLE

Status
Not open for further replies.

techg

Programmer
Nov 27, 2001
8
US
hi
i am developing application which requires to read data from a external DB(access)into a jTable which is placed on a Jtabbedpane , any help as to how it can be done with a simple procedure ( how to do) with sample code will help
any help will be appreciated
thank u
techg
 
steps:<br><ol><br><li>make a new JTable object</li><br><li>set the columns for the table</li><br><li>get a JDBC connection to the database</li><br><li>get a result set from the database</li><br><li>loop through the result set</li><br><li>upon each row, add each column's value to the table (using something like setValueAt(Object aValue, int row, int column) ; I'm not sure what else you'd use)</li><br></ol><br><br>that's all, as far as I know. helpful link:<br><A HREF=" TARGET="_new"> for javadoc<br>you'll be interested in the java.sql package and the javax.swing.JTable class.<br><br>Best of luck! <p>Liam Morley<br><A HREF="mailto:"></A><br>&quot;light the deep, and bring silence to the world.<br>light the world, and bring depth to the silence.&quot;
 
thank u imotic shall work on it and get back if i have any probs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top