Hello
I'm writing a combination Java/Perl program that parses XML files into an Oracle SQL database. There are two tables in the database - one that holds the data from the XML files and another that holds information about the files themselves (file name, creation time, etc.). Basically, when a new XML file comes along, the Java program checks to see if it has already been parsed, or partially parsed. If it has, it changes the STATUS
column in the filestatus table from 'good' to 'bad' for that file ID, using UPDATE FILESTATUS SET STATUS='bad' WHERE ID=?
. However, when I run it, it gets stuck doing this. Any ideas why this could happen? No error messages are occurring, it just hangs. The code is below.
static void markDataBad(String docID)
{
try
{
String update = "UPDATE FILESTATUS SET STATUS='bad' WHERE ID=?";
PreparedStatement updateStatus = Main.con.prepareStatement(update);
updateStatus.setString(1, docID);
updateStatus.execute();
}
catch (Exception ex) {ex.printStackTrace();}
}
I've already tried changing updateStatus.execute()
to updateStatus.executeQuery()
and updateStatus.executeUpdate()
, but nothing seems to have changed.
Thanks in advance!