As a general rule, you only use "executeQuery(...)" when you have a SELECT query. If you do a INSERT, UPDATE or DELETE you use "executeUpdate(...)". If you don't know what type of query it is--for example if it's a query that is passed in by the user--you can use "execute(...)". The return values are "ResultSet", "int" and "boolean", respectively. Some database drivers will let you get by with doing an "executeQuery(...)" with an INSERT, UPDATE or DELETE, but it's best to choose the correct method for each query. Also, there is no need to do a ".newInstance()" on the "Class.forName(...)". It's bad practice and will result in an unnecessary and useless instance being created.