pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
scollable result sets
4+ messages / 3 participants
[nested] [flat]

* scollable result sets
@ 2006-09-05 21:16 Matt Chambers <chambers@imageworks.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Matt Chambers @ 2006-09-05 21:16 UTC (permalink / raw)
  To: pgsql-jdbc

Are they broken in 8.1?  I no matter what I do Postgresl throws an 
exception with calls to functions like previous() and last().
x_conn.prepareCall ( os_query, ResultSet.TYPE_SCROLL_INSENSITIVE, 
ResultSet.CONCUR_READ_ONLY );   
-- 
*Matt Chambers <chambers@imageworks.com>*
*Sony Pictures Imageworks*
Software Engineer

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: scollable result sets
@ 2006-09-06 07:39 Koth, Christian (DWBI) <Christian.Koth@smiths-heimann.com>
  2006-09-06 16:13 ` Re: scollable result sets Matt Chambers <chambers@imageworks.com>
  2006-09-06 20:12 ` Re: scollable result sets Oliver Jowett <oliver@opencloud.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Koth, Christian (DWBI) @ 2006-09-06 07:39 UTC (permalink / raw)
  To: chambers@imageworks.com; +Cc: pgsql-jdbc


Matt,
no they are not broken.
But AFAIK a ScrollableResultSet with Postgres JDBC supports forward only. Try again with different settings and of course don't call previous().
If you need scroll back functionality you could use cursors.
Christian


________________________________

	Von: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] Im Auftrag von Matt Chambers
	Gesendet: Dienstag, 5. September 2006 23:16
	An: pgsql-jdbc@postgresql.org
	Betreff: [JDBC] scollable result sets


	Are they broken in 8.1?  I no matter what I do Postgresl throws an exception with calls to functions like previous() and last().
	x_conn.prepareCall ( os_query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY );   

	--

	Matt Chambers <chambers@imageworks.com> <mailto:chambers@imageworks.com>
	Sony Pictures Imageworks
	Software Engineer





</table> </Pre>
<HTML>
<br>
<br>
************************************************<br>
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.<br>
************************************************<br>
</HTML>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: scollable result sets
  2006-09-06 07:39 Re: scollable result sets Koth, Christian (DWBI) <Christian.Koth@smiths-heimann.com>
@ 2006-09-06 16:13 ` Matt Chambers <chambers@imageworks.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Matt Chambers @ 2006-09-06 16:13 UTC (permalink / raw)
  To: Koth, Christian (DWBI) <Christian.Koth@smiths-heimann.com>; +Cc: pgsql-jdbc


I read someplace that the CVS version may support it.  Unfortunately, 
gborg seems to be down for the past day or so.  Looking through the 
code, I see things like:

while (x_rset.next()) {
    x_rset.previous()
    function_that_calls_next(x_rset)
}

Is there a better way to do this?  With result pointers from other 
languages, like perl, python, php, I know the size of the result so I 
can choose the type of loop I want to use.  Is there a better way to 
loop through a result set and have a another function call next?

Matt

Koth, Christian (DWBI) wrote:

> Matt,
> no they are not broken.
> But AFAIK a ScrollableResultSet with Postgres JDBC supports forward 
> only. Try again with different settings and of course don't call 
> previous().
> If you need scroll back functionality you could use cursors.
> Christian
>
>     ------------------------------------------------------------------------
>     *Von:* pgsql-jdbc-owner@postgresql.org
>     [mailto:pgsql-jdbc-owner@postgresql.org] *Im Auftrag von *Matt
>     Chambers
>     *Gesendet:* Dienstag, 5. September 2006 23:16
>     *An:* pgsql-jdbc@postgresql.org
>     *Betreff:* [JDBC] scollable result sets
>
>     Are they broken in 8.1?  I no matter what I do Postgresl throws an
>     exception with calls to functions like previous() and last().
>     x_conn.prepareCall ( os_query, ResultSet.TYPE_SCROLL_INSENSITIVE,
>     ResultSet.CONCUR_READ_ONLY );   
>     -- 
>     *Matt Chambers <chambers@imageworks.com>*
>     *Sony Pictures Imageworks*
>     Software Engineer
>
>  
>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: scollable result sets
  2006-09-06 07:39 Re: scollable result sets Koth, Christian (DWBI) <Christian.Koth@smiths-heimann.com>
@ 2006-09-06 20:12 ` Oliver Jowett <oliver@opencloud.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Oliver Jowett @ 2006-09-06 20:12 UTC (permalink / raw)
  To: Koth, Christian (DWBI) <Christian.Koth@smiths-heimann.com>; +Cc: chambers@imageworks.com; pgsql-jdbc

Koth, Christian (DWBI) wrote:
> Matt,
> no they are not broken.

Actually I think CallableStatements are (it's already fixed in CVS)

> But AFAIK a ScrollableResultSet with Postgres JDBC supports forward 
> only.

This is incorrect. If it's FORWARD_ONLY, it's not scrollable by definition.

-O



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2006-09-06 20:12 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-09-05 21:16 scollable result sets Matt Chambers <chambers@imageworks.com>
2006-09-06 07:39 Re: scollable result sets Koth, Christian (DWBI) <Christian.Koth@smiths-heimann.com>
2006-09-06 16:13 ` Matt Chambers <chambers@imageworks.com>
2006-09-06 20:12 ` Oliver Jowett <oliver@opencloud.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox