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

Why use result sets rather than variables in Sybase?

In a Sybase database I am working with result sets are used (misused?) as variables. For example, one often finds lines such as the following: select SOMETHING = 'bla' "SOMETHING" is technically a result set ... and the content of the result set…
Thomas_SO
  • 1,883
  • 2
  • 10
  • 20
0
votes
3 answers

How to pass DB table values with curl in a while loop?

In below code, I am trying to pass values dynamically for "OrderNo & AWB". $sql="SELECT order_id , alternateno FROM do_order"; $con=mysqli_connect("localhost","root","","do_management"); if ($result=mysqli_query($con,$sql)) { while…
user8444404
0
votes
0 answers

Multiple objects from one ResultSet using JDBC Template with Spring

This is what the rs gets as a result: Order(id=1, orderNumber=A1, orderRows=[OrderRow(itemName=Motherboard, quantity=0, price=5), OrderRow(itemName=Cpu, quantity=5, price=0)]) And now I am trying to get both of the OrderRows: private…
Kolka Tankari
  • 49
  • 1
  • 6
0
votes
2 answers

Database result is passed as null unless it's read

Set rslistings = my_conn.Execute(strSQL) Do while NOT rslistings.Eof description = strip(rslistings("description")) rslistings.MoveNext loop In strip - NULL is being passed. However, if I attach a debugger and inspect the contents of…
Paul
  • 9,409
  • 13
  • 64
  • 113
0
votes
1 answer

Oracle : Join 2 result sets

I'm stuck and I need an advice how to join 2 resultsets into 1 The first resultset has thresholds values for different mountpoints. There is a row for each mountpoint with non-default threshold value, eg "u01" - "u08". The default threshold…
Vic VKh
  • 169
  • 1
  • 2
  • 11
0
votes
3 answers

How to return the Result Set in Java

I am trying to return a resultset of a given student id and show the gpa. However it is saying I am not able to do the operation when the result set is closed. This is my code: /** * Returns a ResultSet with a row containing the computed GPA…
Loyal_Burrito
  • 125
  • 2
  • 14
0
votes
0 answers

Java Write queries into a txt upon every getStatement().executeQuery() call

My problem is that I would like to write all the queries called in my app into a log file. For example: here's a query: String query = "SELECT * FROM users WHERE name LIKE 'Mike'"; I also have a Connection (DBConnect) object, with which I execute…
mordes
  • 73
  • 1
  • 1
  • 9
0
votes
1 answer

DB2 procedure return tables

Hi I have this procedure: CREATE PROCEDURE TEST() LANGUAGE SQL Specific TEST BEGIN DECLARE V_TEST VARCHAR(100); DECLARE V_TEST_EXT VARCHAR(100); DECLARE SQLCODE INTEGER DEFAULT -1; DECLARE RET_CODE INTEGER DEFAULT -2; DECLARE LIST_CMD…
Viking
  • 73
  • 1
  • 9
0
votes
1 answer

Inserting rows into a ResultSet without update method in Java JDBC

Q1: I have a loop inside which there is a select statement. Now I want to accumulate all these rows from select statement, into a ResultSet and then use it for other purpose outside the loop. How can I achieve that? while(rs.next()){ //some…
Ravi Shankar
  • 277
  • 9
  • 23
0
votes
3 answers

Filtering rows from a resultset

I have created a java method that returns a resultset like this: String query = "SELECT * FROM "+table_name+" WHERE "+parameter+ " = " +condition; ResultSet rs = stmt.excecuteQuery(query); return rs; My understanding is that ResultSet can be though…
da1g
  • 107
  • 2
  • 7
0
votes
1 answer

JDBC ResultSet closed in Java after several iterations

I am having a problem with a ResultSet being closed. What confuses me is that it works for a portion of the data and then closes. At first I thought it might be because of connection timeout but that doesn't seem the case. This portion of the…
user2999980
  • 31
  • 2
  • 8
0
votes
1 answer

Best way to get result of prepared MySQL statement with maximum of one row

I usually use this code to read/get the result of an prepared MySQL SELECT: $sqlname = $conn->prepare("SELECT name FROM test1 WHERE test2 = ?"); $sqlname->bind_param('s',$test); $sqlname->execute(); $result = $sqlname->get_result(); if…
0
votes
1 answer

sql server entity framework WPF database first procedure with select returns list

I have a problem with stored procedures in SQL Server that implement business logic on DB level where no return value is expected. In WPF application, database first approach, importing these procedures (EF) I can see return value as collection of…
Roman Dulak
  • 51
  • 1
  • 6
0
votes
2 answers

CI Query result giving unexpected result

I am using codeigniter framework's active class to build query, my query is below maintained and output and expected output are different, I this the query result in browser and query result in phpmyadmin should be same but here it's not: function…
0
votes
1 answer

replace split string in JLIST element using ResultSet SQLITE

I have a JList model (listModelGrid) with items with labels like this: LastName, FirstName Spouse // e.g. This is 1st list item with labels Children // e.g. This is 2nd list item with labels Street // e.g. This…
user1773603
1 2 3
99
100