Top "Resultset" questions

A result set is a set of rows from a database, which is usually generated by executing a statement that queries the database.

How do I get the size of a java.sql.ResultSet?

Shouldn't this be a pretty straightforward operation? However, I see there's neither a size() nor length() method.

java sql jdbc resultset record-count
How to get row count using ResultSet in Java?

I'm trying to create a simple method that receives a ResultSet as a parameter and returns an int that contains …

java jdbc resultset
Checking for a null int value from a Java ResultSet

In Java I'm trying to test for a null value, from a ResultSet, where the column is being cast to …

java null resultset
Get Number of Rows returned by ResultSet in Java

I have used a ResultSet that returns certain number of rows. My code is something like this: ResultSet res = getData(); …

java resultset
Fastest way to write huge data in text file Java

I have to write huge data in text[csv] file. I used BufferedWriter to write the data and it took …

java file resultset
Most efficient conversion of ResultSet to JSON?

The following code converts a ResultSet to a JSON string using JSONArray and JSONObject. import org.json.JSONArray; import org.…

java sql json resultset
Iterating over ResultSet and adding its value in an ArrayList

I am iterating over an ResultSet and trying to copy its values in an ArrayList. The problem is that its …

java jdbc resultset loops
How to get the number of columns from a JDBC ResultSet?

I am using CsvJdbc (it is a JDBC-driver for csv-files) to access a csv-file. I don't know how many columns …

java jdbc csv resultset
Python, how to check if a result set is empty?

I have a sql statement that returns no hits. For example, 'select * from TAB where 1 = 2'. I want to check …

python resultset python-db-api
Efficient way to Handle ResultSet in Java

I'm using a ResultSet in Java, and am not sure how to properly close it. I'm considering using the ResultSet …

java hashmap resultset sqlresultsetmapping