*
* @return Description of the Return Value
*/
public boolean IsDeleteOK() {
try {
DataConnection dc = DataConnection.getInstance(view);
if (dc == null || !dc.bIsConnectionMade) {
return false;
}
PreparedStatement stmt = dc.con.prepareStatement(dc.filterSQL(
"SELECT * FROM Activity2 where CompId=?"));
stmt.setInt(1, textField1.getInteger().intValue());
ResultSet rs = stmt.executeQuery();
if (rs.next()) {
CannotUpdateMessage();
return false;
}
stmt.close();
rs.close();
stmt = dc.con.prepareStatement(dc.filterSQL(
"SELECT * FROM Account where CompId=?"));
stmt.setInt(1, textField1.getInteger().intValue());
rs = stmt.executeQuery();
if (rs.next()) {
CannotUpdateMessage();
return false;
}
stmt.close();
rs.close();
stmt = dc.con.prepareStatement(dc.filterSQL(
"SELECT * FROM Customer2 where CompId=?"));
stmt.setInt(1, textField1.getInteger().intValue());
rs = stmt.executeQuery();
if (rs.next()) {
CannotUpdateMessage();