resultset

Sybase Stored Procedure ResultSet streaming?

I am certain that this is documented somewhere, but I can't seem to find it. Does anybody know if JDBC stored procedure results are streamed in Sybase? In particular, if I use a CallableStatement to call a Sybase stored procedure, is it possible for the Java code start to read rows from the resulting ResultSet before the stored procedu...

Behaviour of ResultSet.TYPE_SCROLL_SENSITIVE

Hi, I am confused about the behaviour of a ResultSet that is of type TYPE_SCROLL_SENSITIVE. My understanding of this is - 1.) I execute a select query that returns me a result set. I print out the value of a particular column in the first row. 2.) I then execute Thread.sleep(10000), which halts the program for 10 seconds. 3.) While th...

How Do I Dynamically Manipulate Mulitiple Strings Returned by mysql_fetch_array from MySQL Tables with One to Many Relationships?

I am attempting to dynamically change portions of a record set string returned by a mysql_fetch_array function within a nested while loop. The results are pulled from MySQL tables with one to many relationships, so I sometimes get more than one string result per iteration through the while loop. The results returned are correct, but I a...

How can I get the column name of the primary key of a Database Table from the ResultSet or ResultSetMetaData object in JAVA?

I am writing a Java Application. I have got a ResultSet. Now I want to find out the coloumn name of the primary key of the table. Is it possible to get that coloumn name through ResultSet object or ResultSetMetaData Object or any other way. I didn't find any way to find this. ...

ant sql task throws "no ResultSet available" with org.sqlite.JDBC driver

I'm trying to use org.sqlite.JDBC to create and update a sqlite database in ant. The sqlitejdbc-v056.jar comes from http://www.zentus.com/sqlitejdbc/ and is the latest version (056) This is my build.xml: <?xml version="1.0" encoding="utf-8"?> <project name="My Project" default="mytarget" basedir="."> <path id="antclasspath"> ...

can i return a custom result after reviewing a stored procedures' result?

I want to return custom values as the values of the rows in case when no rows are fetched by executing the stored procedure - is there a way to do that? ...

Joining multiple result set

I am trying to develop a Java application which merges data from multiple data source basically RDBMS. The scenario is some thing like this. I have creates a connection to two data sources, lets say a MSSQL database and other Oracle. Also on each connection a user can create a DataObject( a Java object) which contains a SQL query and a ...

OSCommerce Product Listing Shows Inaccurate Count and Results Per Page

http://www.roguevalleyroses.com/rose_list.php?search_id=&amp;class=&amp;height=&amp;growth=&amp;color=&amp;bloom_size=&amp;bloom_type=&amp;shade=&amp;fragrance=&amp;disease=&amp;rebloom=&amp;thorns=&amp;zone=&amp;hybridizer=Ashdown%20Roses&amp;date_range=&amp;text=&amp;view=&amp;show=&amp;page=4 This is the page. The code that queries ...

Java: JDBC ResultSet not populated with all query results

I'm working on getting our system's java beans to be able to use the SQL IN clause when running queries down through the database, but am running into a perplexing problem. I am build the SQL query for the PreparedStatement in the following generic pattern: select [column names] from [table name] where [a column name] IN (?, ? , ?, .....

Is it possible to use NHibernate for retrieving data from SP which returns multiple selects?

My stored procedure: CREATE PROCEDURE spSomeStoredProcedure AS BEGIN SELECT CategoryName FROM Categories ORDER BY CategoryName SELECT Top 10 CompanyName FROM Customers ORDER BY CompanyName END GO I tried to use ISQLQuery, but List() method returns data only from the first SELECT ...

What happens to the original resultSet when it is returned from a method into a new object?

pseudo code to explain my self better. I'm learning Java at this point in time. if I have a method public resultSet getEverything() { resultSet rs = blabla; return rs } I can't rs.close() as I need to use it in the method I retrieve it hence then I will use it, and maybe 'close' the new resultSet I create. What happ...

Editing JTable from RestulSet Table

Continuing this question. My problem is that I can not edit my JTable. I get an exception and the Object value instead of what I should be seeing. I am using the ResultSet Table code with a MS-Access database and with a few modifications. My code can be found here. I run into an error when I rs.updateRow() is called. java.sql.SQLExcept...

populating bean objects from the resultset

I am facing a problem regarding populating bean objects from the resultset. Description:Resultset contains the result of a stored procedure which is join of 3 tables B, BO, and BOV. I have 3 POJO's corresponding to tables. The relation between tables is: B can have 0 or more BO's, BO can have 0 or more BOV's. So totally in resultset I ...

PHP: How to use mysql fulltext search and handle fulltext search result

Hello, I have tried to use mysql fulltext search in my intranet. I wanted to use it to search in multiple tables, and get the independant results depending on tables in the result page. This is what i did for searching. $query = " SELECT * FROM testtable t1, testtable2 t2, testtable3 t3 WHERE match(t1.firstNa...

PHP - get MySQL query results as their native data type?

I've tried fetching MySQL query results using mysql_fetch_row() mysql_result() and numeric values are being returned as strings. Is there any way to fetch the data as its datatype stored in the table? The application will be querying many different queries so I will be unable to cast the values as the intended datatype on a 1 by 1 basi...

Put stored procedure result set into a table-- any shortcuts besides INSERT INTO...EXEC?

Hi everyone, I'm creating a temp table that's the result of a stored procedure's result set. Right now I'm using the create table statement, followed by insert into....exec. It gets the job done but I was curious if there are other ways of going about this? I wish it were possible to run a select into, with the stored procedure's res...

Handling large datasets with PHP/Drupal

Hi all, I have a report page that deals with ~700k records from a database table. I can display this on a webpage using paging to break up the results. However, my export to PDF/CSV functions rely on processing the entire data set at once and I'm hitting my 256MB memory limit at around 250k rows. I don't feel comfortable increasing the...

Reading ResultSet from multiple threads

Hello, In the database, I have a definition table that is read from the application once upon starting. This definition table rarely changes, so it makes sense to read it once and restart the application every time it changes. However, after the table is read (put into a ResultSet), it will be read by multiple handlers running in their...

AJAX - querying a search engine and returning the number of results

Right, so basically I need to query a selection of search engines in an AJAX app. As there is a number of different search engines - there's no search engine specific API I can use either. My main problem is getting the number of results returned by the search. So far, I have decided it is probably best to use a regexp from the returned...

Problem with SQL, ResultSet in java

How can I iterate ResultSet ? I've tried with the following code, but i get the error java.sql.SQLException: Illegal operation on empty result set. while ( !rs.isLast()) { rs.next(); int id = rs.getInt("person_id"); SQL.getInstance().getSt().execute("INSERT ref_person_pub(person_id) VALUES(" + id + ")"); } Update: I've...