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

Null Pointer Exception in Servlet

I'm having a rather annoying issue with a shopping servlet I'm designing. I keep getting a null pointer exception when I try setting up an order object like this: int ccn=customer.getCcn(); OrderList.Order order=null; …
Leif
  • 177
  • 1
  • 5
  • 17
0
votes
0 answers

How to Load "result set" one by one into table view?

I have loaded millions of rows of data from 5 tables in database. I want to display the loaded data into a tableview. It takes a long time to load all the records(sometimes all of them don't fit into memory). I want to make it so that I can load a…
Michael Kročka
  • 617
  • 7
  • 22
0
votes
1 answer

Adding result set into ArrayList take so much of time

Here is my code where i am running my query and adding result set into ArrayList . Modified code private ArrayList getEventsFromShares() throws SQLException { Statement eventStmt = null; ResultSet rs = null; ArrayList
Shailendra
  • 141
  • 1
  • 2
  • 10
0
votes
0 answers

ResultSet getDouble() check for EMPTY values

ResultSet getDouble() returns 0.0 if a value is NULL in the database. This can be checked using "ResultSet wasNull()" which returns a boolean to check if the last read value was NULL. But, my database also holds EMPTY values? These are also…
HideAndSeek
  • 374
  • 3
  • 16
0
votes
1 answer

Streaming join multiple resultSet

I have a problem about sql performance, my db is too many rows, so this make long time to query. SELECT * FROM A JOIN B ON A.id = B.id where ... So I change to SELECT * FROM A where A= a... SELECT * FROM B where B= b... I got 2 resultSet from 2…
0
votes
2 answers

How to return two result sets from stored procedure?

I have two queries in the current page. They are very similar but still returning different number of records. Here is example: Query 1 SELECT recid, cost, cur_year FROM Info i INNER JOIN Extension ex ON ex.recid = i.recid …
espresso_coffee
  • 5,980
  • 11
  • 83
  • 193
0
votes
1 answer

Why am I getting my column values in my result set twice?

I am trying to print out all rows and columns in a test table I have created. My relevant code: $sql = "select * from ITEM"; $stmt = $pdo->prepare($sql); $stmt->execute(); // $stmt->execute(array( // $_POST['ModuleID'] // …
ControlAltDel
  • 33,923
  • 10
  • 53
  • 80
0
votes
1 answer

Ibatis resultmap not working for innerclass

I have a java class as follows class GeoLocation{ // assume member variables // .... class GeoLocationStatus{ // .... } } My Ibatis maps is as follows:
Chetan
  • 4,735
  • 8
  • 48
  • 57
0
votes
1 answer

Loading a java array with rs.next() throws null pointer error no matter what. Checked with console

I have a very simple table. ╔════╦═══════╗ ║ id ║ title ║ ╠════╬═══════╣ ║ 1 ║ cow ║ ║ 2 ║ duck ║ ╚════╩═══════╝ ID is INT TITLE is TEXT I´m trying to fill an array with these two registers. collection class has a constructor of…
Martincho
  • 33
  • 8
0
votes
4 answers

Why is my SQL query failing?

I have this table: sportman { code int primary key, date Date. } containing values code 10, 30, 50. date 1990-02-15, 1999-02-15, 2010-02-15. I wrote this query in NetBeans: resultSet = statement.executeQuery("select code…
Mahdi_Nine
  • 14,205
  • 26
  • 82
  • 117
0
votes
2 answers

ResultSetMetaData using MyBatis

How can I get ResultSetMetaData using MyBatis. I can't use INFORMATION_SCHEMA.columns as I have a complex dynamic query joins with multiple tables. For example, I need Number of records(this one I can get based on list size), List of Columns and…
Siva
  • 1
  • 4
0
votes
1 answer

How to convert bytea to joda.time.DateTime or to Timestamp?

In my database I have a column of type bytea. I want to retrive that value and convert to date time. This is how my value look…
Buda Sergiu Flavius
  • 210
  • 1
  • 3
  • 13
0
votes
1 answer

MSTSQL: Can a SP return both an out param and a result set

I wish to know whether it's feasible to have a TSQL stored procedure return both a result set and the output parameter like so. create procedure uspReadMyXmlInformation(@myXmlDoc xml, @myProductNum varchar(18) output) as begin set…
0
votes
0 answers

Missing results from SQL array

I have a data set in my SQL table (pic related), and when I call back the results the first value is missing from the data set. This is how I call back the data set: $q = "SELECT o.*, f.* FROM opening_hours o LEFT JOIN farms f ON o.farm_id =…
user1228907
  • 369
  • 2
  • 6
  • 16
0
votes
1 answer

Getting error SQLServerException: The result set is closed

I have tried many ways but always i'm getting this error. Actually i'm trying to access result set values from other class and for Database Query i have created a separate class. Please do not mark this as previously asked because i got the solution…
Upkar Singh
  • 147
  • 1
  • 9