try {
String insertQuery = "INSERT INTO emailmessagefolder (MessageID, FolderID) VALUES (?, ?)";
cvdal.setSqlQuery(insertQuery);
cvdal.setInt(1, messageID);
cvdal.setInt(2, newFolderID);
numberCopied = cvdal.executeUpdate();
cvdal.setSqlQueryToNull();
String updateQuery = "UPDATE emailmessage SET LocallyModified='YES', CopiedToFolder=? WHERE MessageID=?";
cvdal.setSqlQuery(updateQuery);
cvdal.setInt(1, newFolderID);