I am searching the database, and I have problem with SQL
returning an empty value. In fact it is possible that this happens and for this I must keep prepared for it. What method to identify that no record was found with that parameter?
I tried to use TRY/CATCH
but it did not work.
My code looks like this:
ResultSet rs_tbl_PESSOAS = con.query("SELECT * FROM tbl_PESSOAS WHERE XXXX= '" + w_obj.getString("XXXX") + "' and COD_IDENT_PESSO = '" + w_obj.getString("COD_IDENT_PESSO") + "';");
ResultSetMetaData rsmd = rs_tbl_PESSOAS.getMetaData();
int columnsNumber = rsmd.getColumnCount();