try {
String sql2 = "SELECT * FROM fit_article_code WHERE i_fit_article = " + Integer.toString(id);
rs2 = stm.executeQuery(sql2);
rs2.next();
CodeList a = new CodeList();
if (rs2.getString("s_code") != null){
a.addCode(rs2.getString("s_code"));
System.out.println(a);
article.setCode(a);
}
} catch (Exception e2) {
e2.printStackTrace();
}
Here I am trying to print out the attribute Code of each object. I have around 2-3 hundreds objects and almost all of them were read just fine. Only for the 3 Objects the programm says there is an exception. I try to run the code again and again, everytime only the 3 cause the problem. I looked at my Database and everything seems normal for the 3 objects. Can some one explain to me what could be wrong here ? Thanks in advance!
Last edit: Tuan Pham 2016-12-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi every one, im trying to set a connection with a database with the help of ucanaccess then got an exception that looks like this
here is my code snippet :
Here I am trying to print out the attribute Code of each object. I have around 2-3 hundreds objects and almost all of them were read just fine. Only for the 3 Objects the programm says there is an exception. I try to run the code again and again, everytime only the 3 cause the problem. I looked at my Database and everything seems normal for the 3 objects. Can some one explain to me what could be wrong here ? Thanks in advance!
Last edit: Tuan Pham 2016-12-01
I have found the problem, please dont mind me, thanks :D