Questions tagged [resultset]

A result set is a set of rows from a database, which is usually generated by executing a statement that queries the database. A resultSet object maintains a cursor pointing to its current row of data.

A result set is a set of rows from a database, which is usually generated by executing a statement that queries the database. A resultSet object maintains a cursor pointing to its current row of data.

2543 questions
0
votes
1 answer

Operation not allowed after ResultSet closed after using ResultSet in AbstractTableModel

I'm trying to create a frame that show me all the movies names in my database, and them select a row in the frame to execute another query. I have a ResultSet (rs) that receive the result of a query execution to select the name of the movies. After…
Tony Starkus
  • 556
  • 2
  • 8
  • 25
0
votes
0 answers

Serializing CachedRowSet

So I already understand what a CachedRowSet is. Mainly it holds the data as opposed to other RowSets/ResultSets which require a connection and retrieve the data each time. Since it does not require a connection, it is serializable, and I quote from…
George Xavier
  • 191
  • 2
  • 12
0
votes
0 answers

Oracle JDBC ResultSet doesn't return correct data set

I noticed this issue when exporting the Oracle SQL execution result from Intellij. sql is "SELECT TableA.seq||'-'||TableB.id doc_id FROM schemaA.TableA JOIN schemaB.TableB JOIN schemaA.TableC JOIN schemaA.TableD ON ...." The SELECT COUNT(doc_id)…
ganxiyun
  • 53
  • 1
  • 5
0
votes
2 answers

Need a more efficient way to convert JDBC resultset to a JSON array

Currently I have the following code that converts my resultset to a JSONObject and then appended to a JSONArry, but the the processing time is way too long for large data sets. I am looking for an alternative way or libraries to improve my current…
Chris_Z
  • 31
  • 7
0
votes
1 answer

Loop through 3 different JDBC resultsets

I am trying to zip 3 CSV files from 3 different tables in single zip file your_files_12354627.zip. So, I've the following method which works fine for zip file generation with 1 csv file in it. I'm trying to do this for multiple files and hence I've…
Tan
  • 1,433
  • 5
  • 27
  • 47
0
votes
0 answers

Whether using ResultSet.TYPE_SCROLL_INSENSITIVE ,ResultSet.CONCUR_UPDATABLE affects performance

I am trying to use rs.first(), but for that to work we have to add ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY in preparedStatement, I just wanted to know whether it is advisable to use and it has any performance…
smootherbug
  • 129
  • 12
0
votes
1 answer

Table doesn't show all data when i filter by a string

I would like to obtain a messageDialog if the id which I'm filtering is not in the table model I created. The problem is that the code works fine without the if, however when I add the if for the messageDialog condition, I realize that the data is…
0
votes
0 answers

createStatement SQL ResultSet next() is returning false

I keep test this connection ResultSet and while System.out.println(rs) returns a oracle.jdbc.driver.ForwardOnlyResultSet@2aa5fe93 System.out.println(rs.next()) gives me false and my output is: Exception in thread "main"…
0
votes
0 answers

MYSQL Result set differs when adding concatenation

I am trying to find a logical answer to an issue I'm having with two different results sets in MYSQL. When I do concatenation on the list of table 3 fields into a single column, I get a different number of results. I don't know if this matters, but…
ComputersAreNeat
  • 175
  • 1
  • 1
  • 11
0
votes
1 answer

Spring JDBCTemplate : Construct JSON without special characters

I am reading table from postgreSQL DB and populating all columns and its values in a json object. One of the column in postgre is of type json. So the output has lot of escape characters. like below for key dummykeyname. { "XY": "900144", …
VIJ
  • 1,516
  • 1
  • 18
  • 34
0
votes
1 answer

Cannot create ArrayList with ResultSet

I'm trying to create an ArrayList based on the ResultSet. Using the while loop to iterate through all the rows I can get only the first row (With rs.next() and rs.first()) as well as the last one (rs.last()). public ArrayList…
Volpym
  • 161
  • 1
  • 1
  • 14
0
votes
1 answer

How can i get a resultset from a select-sql in Pentaho-Kettle?

I dont' know how I can deal with the expected resultset derived from a select-based SQL query launched on database table. I've created a Transformation which includes a Execute SQL Script where I've hardcoded the intended select-sql query. By…
txapeldot
  • 71
  • 2
  • 10
0
votes
1 answer

How to pull an image from a Access attachment field, and place it in a JLabel

I am fairly new to Java so my knowledge is limited. I have this assignment where I have to get data from an Access database and fill a dialogBox full of fields. I had no problem with typical fields, but I hit a dead end trying to make the attachment…
Edward B
  • 3
  • 3
0
votes
0 answers

I need a help in creating a observable list with the result set?

I am sorry I am newbie and I have this doubt... following is my query. Select id,item_table.item_name,quantity, total from Sales inner join item_table on item_code=id I take values from two different tables and I need to create an ObservableList…
0
votes
3 answers

Exporting large data from database into excel using resultset

I need to export result of a resultset into an excel sheet using java. Resultset contains a table with thousands of rows and multiple columns. If someone could provide a sample code that will be very useful as I am stuck with this problem. Below is…