Hi, while im doing my project, i have problem to save edited data from jtable into database..i have attach the sample interface and here is the code...please help me...tq

ResultSet rs=st.executeQuery("select * from 3BITC");
          
  while(rs.next()){
  jTable1.getValueAt(row, col);
  row++;
  col++;
                  
  }
  rs.close();
  try{
                              
  Statement st1=con.createStatement();
  ResultSet rs1=st1.executeQuery("UPDATE 3BITC SET Status = ? WHERE Blue_Add = ? "); 
         
          while(rs1.next()){
               
               
               }
          rs1.close();

Recommended Answers

while(rs.next()){
jTable1.getValueAt(row, col);
row++;
col++;
 
}

WHAT ARE U DOING WITH IT?

Jump to Post

Take a look through the tutorial on using tables and stop hijacking the OP's thread with your own questions.

Jump to Post

All 7 Replies

while(rs.next()){
jTable1.getValueAt(row, col);
row++;
col++;
 
}

WHAT ARE U DOING WITH IT?

while(rs.next()){
jTable1.getValueAt(row, col);
row++;
col++;
 
}

WHAT ARE U DOING WITH IT?

Im a IT student..

Data can not be edited in a Jtable.
You have to take some textfild.

Save the data into a data base table.
You do not say which data base server you are using?
do this.
Ask me later.

>Data can not be edited in a Jtable.
It certainly can be edited and saved back to the database. Ignore this nonsense.

Please show how to edit in Jtable.Not in Database table.Only in Jtable.

It certainly can be edited and saved back to the database. Ignore this nonsense.

Take a look through the tutorial on using tables and stop hijacking the OP's thread with your own questions.

Data can not be edited in a Jtable.
You have to take some textfild.

Save the data into a data base table.
You do not say which data base server you are using?
do this.
Ask me later.

Thank you very much for advices Anuradha Mandal...i have solved it

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.