Greetings!
I did not understand what you said here, not your English, I think it's great, I just did not get it. I do suspect you need to update using a Servlet. It's been a long day, and I truly cannot explain how a servlet works. Please turn below code into a Servlet code. Tips; you'll need to remove 'public static void main(String[] args) {'...
-
import java.sql.*;
-
-
public class YourUpdatingData{
-
public static void main(String[] args) {
-
//make a connection to your driver
-
Connection con = null;
-
try{
-
Class.forName("add your driver info here");
-
//start connection to DB
-
con = DriverManager.getConnection(
-
//example here uses odbc
-
"jdbc:odbc:Northwind","root","root");
-
//run your sql to grab data and update
-
try{
-
String sql = "UPDATE YourTable SET ThisField = ? WHERE ThatField= ?";
-
PreparedStatement prest = con.prepareStatement(sql);
-
//display your results
-
prest.setString(1,"ThisAndThat");
-
prest.setInt(2,00000);
-
prest.executeUpdate();
-
con.close();
-
}
-
//throw an errr if you do not like what is happening
-
catch (SQLException s){
-
System.out.println("Statement did not run!");
-
}
-
}
-
catch (Exception e){
-
e.printStackTrace();
-
}
-
}
-
}
-
-
Here's a tutorial on building your own Servlets
Java Servlet Technology
Looks like you can get sound exaplaination from the good folks @ Sun;-)
Good luck!