Question about Statement object
Posted: Sat May 18, 2013 6:22 am
Hi, I have a question related to this method: st.execute(sql); where st obviously is a Statement object.
Directly from docs.oracle.com/javase/tutorial/jdbc/ba ... ng_queries
Whereas st.executeQuery(sql) and st.exectureUpdate(sql) are very clear. It's not (at least to me) the aim of st.execute(sql) which can also return an int as if it was updated a table.
Thanks in advance..
The_Nick.
Directly from docs.oracle.com/javase/tutorial/jdbc/ba ... ng_queries
What do they mean by "one or more ResultSet objcets"? if so how is it possible to manage them once got an array of ResultSet?execute: Returns true if the first object that the query returns is a ResultSet object. Use this method if the query could return one or more ResultSet objects. Retrieve the ResultSet objects returned from the query by repeatedly calling Statement.getResutSet.
Whereas st.executeQuery(sql) and st.exectureUpdate(sql) are very clear. It's not (at least to me) the aim of st.execute(sql) which can also return an int as if it was updated a table.
Thanks in advance..
The_Nick.