Saturday, August 1, 2009

Database table not updating

Earlier when I encountered this problem, I when into database directly and deleted the tables. However, when I uploaded it to the remote server, I realized that I don't have access to the remote server directly! This means I must delete the tables I want to change through java servlet. So, in the ConfigServlet.java file, under checkTables() method, which create tables if no table exist. I inserted the following code in the very beginning:
String sql1 = "drop table metadata";
DB.executeQuery(sql1);
These 2 lines of command tells the database to delete the metadata table. Then, when the servlet checks if there's a table to create, it will find none, and consequently create the new table with update.

No comments:

Powered By Blogger