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
2 answers

How to check resultset is empty or null in java

I have a sql query to run in my java class (Servlet) what i am trying to do if there is no data in database for that query then want to do something else. In simple terms i am checking if there is no data in resultset than want to do something…
user11176692
0
votes
1 answer

Column result doesn't as be expected

Here i have query to join two table and merge it into one result by using this query String query = "SELECT * FROM tb_barang RIGHT JOIN tb_jenis ON tb_barang.kd_jenis = tb_jenis.kd_jenis "; And here is my table structures for both of tables Table…
sinyo1015
  • 35
  • 1
  • 9
0
votes
0 answers

How to return an integer from a resultset method

Im doing a project for my class in highschool, so i need to build a billing system but i found a problem, i need to get the ID of a bill but the method im trying to use isnt returning an integer and everytime a try to convert it says "unreported…
0
votes
3 answers

ArrayIndexOutOfBoundsException when performing resultSet.next() when there are more rows

I am trying to query a table that has long-raw() type data which is having a text in it. I need to export this data to a flat file. For a given id, I see there are 14 rows in the table. I am fetching the data using JDBC connection and when fetching…
kumarji.alluri
  • 197
  • 1
  • 3
  • 13
0
votes
1 answer

Why do I get NA values after filtering a dataset and running a regression based on that set?

I am using the gpa1 dataset in R and am trying to filter out all instances where a student has worked less than or equal to 19 hours and does not volunteer or participate in any clubs. I can run the filter and save the data fine, and get the results…
0
votes
0 answers

Looping through resultSet only gives last object from table

I've been trying to loop through my resultSet but for some reason only the last object in my database is selected. The idea is that I already pulled my needed Section from my database and I now want to add objects to my secions array list. e.g. I…
Rugo
  • 349
  • 1
  • 6
  • 14
0
votes
0 answers

Java result set issue - converting exception

I have Database on my server which I am accessing via my Java app. First it was MySQL database but now we changed server and we are using SQL. Now I am re-writing the code and I have exception when I am reading from it. In one of functions I use the…
0
votes
1 answer

How to insert cursor/resultset that produced by stored procedure to temporary table in db2

hi im trying to insert the resultset to temporary table using this method, this was asked before How i can put a result set from a stored procedure in a temporary table in DB2 but no one actually answer it so. CREATE OR REPLACE PROCEDURE…
Applegate
  • 27
  • 6
0
votes
1 answer

How to print values from result set without any duplicated record from column

I have created code. Please check the link from the comment. i'm trying to write code which gives unique records for specific column but not for all columns. also tried [while(rs.next())]. but it prints all records with duplicated column values. i…
Arch8
  • 41
  • 7
0
votes
1 answer

IBatis: resultMap not being taken into account

I've been trying to get iBatis to return a list of POJOs like on this link: http://www.java2s.com/Code/Java/J2EE/GetListOfObjects.htm All I'm getting in return is a list of Map instances. Is there something I might be missing that usually baffles…
James P.
  • 19,313
  • 27
  • 97
  • 155
0
votes
1 answer

Result set always returns empty, should I not use executeQuery() on my prepared statement?

I've got users trying to register to a site. before they can register their username of choice is searched for in an SQL database to make sure it doesn't already exist. the problem is the names are never searched because the ResultSet always…
user10871827
0
votes
1 answer

Get fast resultset with mysql jdbc

I have a lineitem table with 6001215 rows of data and I wanted to get the result of this query SELECT * FROM LINEITEM quickly, to then treat the data from the resultset in memory. I have this code, but it's still very slow anyway. String…
programmer
  • 65
  • 1
  • 7
0
votes
1 answer

DB2 forces BITWISE-OR if ResultSet.TYPE_SCROLL_INSENSITIVE used

I use JDBC to connect to a db2 luw with blu accelaration 11.x db2 luw without blu acceleration has the same issue. conn.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY, …
Gersee
  • 806
  • 3
  • 15
  • 30
0
votes
2 answers

Java ResultSet is not being closed properly

I have a Java application with many code snippets like the example below. Very simple querying of an Oracle database. Valid data is returned and parsed, then the close() functions are called. ResultSet rs = null; Statement stmt = null; try { …
jmwilkes
  • 19
  • 3
0
votes
0 answers

resultset inside a paragraph tag and the lines are not breaking

strong texti am getting data from my database into the inside of a paragraph tag it is inside a border box but when the data comes from the database it comes as a straightline and the lines do not break. you can see the sentence going out of the…