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

C# Dataset equivalent in java which can handle multiple data tables

Need to migrate some data access function from vb.net to java. Those vb function will call stored procedure which results multiple datatable. In vb.net it's is handled using dataset. Will access table by dataset.table(0) Vb.net code Like: Dataset…
0
votes
0 answers

Question about Extended events - lock_acquired and lock_released

I'm trying to create EE session that will track lock_acquired and lock_released events for specific object Here is definition of EE session CREATE EVENT SESSION [Locks acquired] ON SERVER ADD EVENT sqlserver.lock_acquired(SET…
Alexandr
  • 25
  • 7
0
votes
1 answer

In SQL, how can I show the first row of a group and hide one column in the rest of the group

I am trying to export an SQL query to Excel, and I need this behaviour but I can't find in anywhere. This is what I currently have: SELECT t1.c1, t2.c2 FROM table1 t1 INNER JOIN table2 t2 ON t1.id = t2.id; |c1| c2 | ---------------- |a |…
0
votes
0 answers

Will the next call to ResultSet.next() fetch more rows from the database?

How can I find out if the next call to ResultSet.next() will fetch more rows from the database? I could set the fetch size (e.g. ResultSet.setFetchSize(1000)) and then check if ResultSet.getRow() is a multiple of the fetch size (e.g. 1000). This is…
Nathan
  • 8,093
  • 8
  • 50
  • 76
0
votes
1 answer

Unable to query database correctly using JDBC

I am trying to update a database using input from user and saving it in jtable, then using jtable I am updating the database, but I am not able to get fetch and update 2nd row in database. please suggest a solution, Thanks in advance. try…
SHIRISH
  • 3
  • 2
0
votes
1 answer

java reflection for generic type when using jdbc

In C#, I got an utility that cast Datatable into a list of specified model, like this: Datatable dt = conn.GetDataTable(); List result = EntityHelper.GetListModel(dataTable); And the GetListModel() method that using generic…
julanove
  • 405
  • 5
  • 19
0
votes
0 answers

Multiple sql queries vs a single query from java application for many to one join

I have often ran into a situation where I have a many to one relationship in a database (for a contrived example, say players to team; where a team has many players, but a player only plays for a single team at a given time) and I am looking to run…
Connor Butch
  • 648
  • 1
  • 10
  • 28
0
votes
0 answers

Can't loop through bs4.element.ResultSet type in python using Beautiful Soup

Please refer the code : ```soup=BeautifulSoup(browser.page_source, "html.parser") rlist=soup.find_all('div',{"class": "WMbnJf gws-localreviews__google-review"})# whole orange box class="WMbnJf gws-localreviews__google-review
0
votes
2 answers

How to organize string from big to small and alphabetically with result?

def word_count(str): counts = dict() words = str.split() for word in words: if word in counts: counts[word] += 1 else: counts[word] = 1 return counts print(word_count("""the quick brown fox…
Leo ley
  • 19
  • 4
0
votes
2 answers

How to capture value from rs.next() before looping through sql database?

SQL db Refer the image. I am new to Java.So in the table I want var x to point to first row.Initially var y should also point to first row.I want to just update y variable to next row in the while loop every time keeping x static until x and y…
Aziz
  • 23
  • 6
0
votes
1 answer

Is it NOT possible to 'nest' ResultSet queries? or use a query inside a loop?

public void generateEnumeration() { StyledDocument docExam = txtpaneExamGeneration.getStyledDocument(); StyledDocument docAnsKey = txtpaneAnswerKey.getStyledDocument(); Connection con = null; Statement stmt = null; …
0
votes
0 answers

Cassandra ResultSet returns same set of records(same page) with pagination

I am doing full scan of Cassandra table which has 75 million records. I am using cassandra python driver to connect to cassandra database and below is my code. While iterating ResultSet, the loop is fetching 100 records per page which is fine but it…
0
votes
1 answer

japanese-character-encoding-in-java- from Db2 database

i m getting the clob data from db2 and storing in an list and then writing to a text file,but jappnese characters are not getting encoded. Getting data from db2 if (rs != null) { int slNo = 0; BufferedReader reader =…
user13310031
0
votes
1 answer

How to get resultset from a SQL Server trigger

I do some validations and checks in SQL Server triggers, but I couldn't manage to get a custom select statement from a trigger. I need to get it into a temp table or into some variables, how to do that? Table structure: create table Orders ( ID…
Ali CAKIL
  • 383
  • 5
  • 21
0
votes
1 answer

JDBC ResultSet with SQL Server

When query using JDBC createStatement and getting ResultSet of millions of rows (from SQL Server), what SQL queries are really executed, where do the rows are stored and how many rows? Does it use SQL Server cursor? I know that only a limited number…
Tal Glik
  • 480
  • 2
  • 11