If I have build a software and any user uses it. If user enters any details say he wants to update any of his entry and he enters wrong details which are not available in table.
Then how can I make sure that user is informed about error by displaying message on screen may be on any textfield.
Is there any such query available. Or any other ways to do it.
May be if user wants to delete data in table and he enters ID not available in table then he must be informed about that by displaying any message on screen.
===================
private static void updatepeasinfo(String wbst, String email, String passwd, String key, String passky) throws SQLException
{
wbst = wbst.toUpperCase();
stmt = conn.createStatement();
String query = "UPDATE peasinfo SET password = ?, encrykey = ? WHERE website = ? and email = ? and pass = ?";
try{
java.sql.PreparedStatement pstmt = conn.prepareStatement(query);
pstmt.setString(1,passwd);
pstmt.setString(2,key);
pstmt.setString(3,wbst);
pstmt.setString(4,email);
pstmt.setString(5,passky);
pstmt.executeUpdate();
}
catch (SQLException sqlExcept)
{
sqlExcept.printStackTrace();
}
}
========where should I gave the message that record to update don't exist============