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

Can Hibernate map the result set of a 1:M join in a subselect to a parent with a child collection?

I am attempting to map the result of a SQL left join to an object structure of the form parent -> [child], where a condition on the SQL query restricts the result to one parent. The result set contains n rows because there are n children, but of…
alfa
  • 25
  • 4
0
votes
0 answers

Select one way without return

Working with the professional mobility of insee on more than 1m of entities, i seek to add up a field called ipondi only on the journeys from commune of residence to commune of work, and not of commune of work to residential commune. Let us assume…
Préliator
  • 71
  • 3
0
votes
0 answers

why is using List without diamond operator as a method parameter type causing a compile error?

I am retrieving a resultset from the database which comes in the form of a list of objects. I wrote a method that converts this list of objects to instances of class LocalizedCropNameDTO. Here is the method: private List
Maurice
  • 6,698
  • 9
  • 47
  • 104
0
votes
1 answer

How to get value from database in JAVA program from a specific row and column?

I am making a JAVA program where I have placed some values in a database with a table new_table. It has columns: Username, Password, and Name. I am taking input from the user for a username and password through the console and check if it matches a…
Jyotirmay
  • 513
  • 6
  • 22
0
votes
1 answer

SQLException(RSMDA Column Type Name you requested is unknown) in Sybase using Spark

So I have source query in Sybase something like this query = "select * from Table_A A LEFT JOIN TABLE_B B ON A.id = B.id order by id" I am trying to fetch the data from the source query into spark using jdbc. It seems like I have to wrap my query…
2shar
  • 101
  • 1
  • 11
0
votes
3 answers

IndexOutOfBounds. How should you store data from resultSet into an ArrayList?

So, I have a method that (should) return a String containing a data from a sqlite database: public String getLesson() throws ClassNotFoundException { ArrayList list = new ArrayList(); int selectedColumn = tblOpenLesson.getSelectedColumn(); …
0
votes
0 answers

java performance impact of capturing lambda pattern in case of database interaction

I am using lambdas for ensuring closing of the result set and database connection. In my below code I am capturing variables like (activeList, inActiveList, user). In many places it was told, although linkage(one time cost) and invocation cost are…
peru
  • 29
  • 3
0
votes
1 answer

Java - Count Difference in minutes

I have to count the difference in Minutes between these two Dates, but the Dates are overlapping. I have two date ranges: EventStart, EventEnd I've written a SQL Query before (see below) and it's working perfectly but its really slow, so I want to…
dzsordzso
  • 3
  • 2
0
votes
3 answers

How to post a specific record from resultset to another page

I'm a newbie in PHP and i've got stucked into this... I have a database and a simple search form. I can search without problems using the criteria i want - for example, i fill in as name "Alex" and i can see 5 records in my resultset with this…
0
votes
1 answer

MySQL XDEV Nodejs Driver not returning empty resultset

i'm calling a stored procedure mysql using xdev nodejs driver. The stored procedure returns multiple resultset. When trying nextresultset, i'm getting only the non-empty resultset. So this messes with the resultant data index.
Baruk
  • 41
  • 1
  • 3
0
votes
1 answer

Datastax Cassandra Driver Asynchronous ResultSet Fetching Does Not Work

I want to load larget row of data, so my plan is divide the statement to parts, divided by timestamp, and than run it asynchronously. ... // List to save ResultSets List> pending = new ArrayList<>(); for(Range…
panoet
  • 3,608
  • 1
  • 16
  • 27
0
votes
1 answer

ExecuteXmlReader and null Resultset Throws TargetInvocationException

I'm calling a stored procedure on a SQL Server 2005 database which returns an XML resultset. Sometimes it will return an null resultset becuase there are not rows to return. When this happens athe ExecuteXmlReader method throws a…
macleojw
  • 4,113
  • 10
  • 43
  • 63
0
votes
1 answer

SQLite: Inner join on result set

In SQLite, is there way to do an inner join of some table on a result set? Kind of like this hypothetical query: SELECT el1,el2 FROM pairs INNER JOIN ( AS result) ON el1 IN result AND el2 IN result; The redundant working query should…
Radio Controlled
  • 825
  • 8
  • 23
0
votes
0 answers

Check if a table exists using Java

I am trying to perform a check on the database for a table using the below snippet: But the problem is, if the table or the view is empty the condition tables.next() does not evaluate to true, how to handle this scenario? DatabaseMetaData dbm =…
D.Amudha
  • 1
  • 1
0
votes
1 answer

Java: How to retrieve SQL resultSet data through column name?

I wanted to retrieve the data stored in resultSet through the column names and the index of the row. Is there any way to do that? I tried through arraylist but I was not able to do that. Example: There is table called Employee which has around 20…