resultset.first() and resultset.getFetchSize() not working

resultset.first() and resultset.getFetchSize() not working

Post by Ian Morle » Fri, 22 Nov 2002 13:05:03



Hi,

resultset.first() returns SQLException: [Microsoft]
[SQLServer 2000 Driver for JDBC]Unsupported method:
Resultset.first

and

resultset.getFetchSize() returns 0 constantly, no matter
how many records are returned by our SELECT statement.

anyone have any ideas?

Thanks,
Ian.

 
 
 

resultset.first() and resultset.getFetchSize() not working

Post by Joseph Weinstei » Fri, 22 Nov 2002 14:52:33



> Hi,
> resultset.first() returns SQLException: [Microsoft]
> [SQLServer 2000 Driver for JDBC]Unsupported method:
> Resultset.first
> and resultset.getFetchSize() returns 0 constantly, no matter
> how many records are returned by our SELECT statement.
> anyone have any ideas?

Sure. The first one is the driver explicitly telling us it doesn't implement that method,
so you'll have to do without.

As to the second, setFetchSize() and getFetchSize() have nothing to do with how
many rows you get back from your queries. They are just methods to hint to the
driver (if it's listening and capable of using the hint) how many data rows to get from
the server in one go (rather than getting one row every time you call next()). In other
words, it's just a tuning feature if the driver can use it. This driver cannot use the hint.
Depending on how the query was made, this driver can only get rows one-at-a-time,
or it will get them all at once. In any case, the driver will always return all the rows
that come from the DBMS in response to your query. If you actually want to limit
the amount of rows, the best way is with the SQL you issue.

Joe Weinstein at BEA

Quote:

> Thanks,
> Ian.


 
 
 

1. ResultSet getFetchSize()

I am writing servlets that access a mysql database. Is there a way to
get the number of rows fetched by the resultset execute query method? I
tried someting like resultSet.getFetchSize() , but I get an Internal
Server Error

thanks

2. EXECUTE

3. Problem: Parameters do not work with resultset

4. Portland VisualBasic Users Posting

5. How to copy long raw in stored procedures ?

6. ResultSet refreshRow() and MS SQL does not work

7. tabbed control

8. ResultSet.updateXXX() not work

9. multiple resultsets into 1 resultset ???

10. ResultSet with few rows invisible to ResultSet.next()

11. Private Resultset vs. Public Resultset