db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manjula Kutty" <manjula.ku...@gmail.com>
Subject Re: CurrentOfTest.java in the client/server mode
Date Fri, 09 Feb 2007 17:58:33 GMT
Hi Knut,

Thanks for your clarification. It helps a lot. So for the time being I make
the CurrentOfTest.java to run only in the embedded mode and will open a jira
issue to address the difference in behaviour. If some one fixes that then
they can just uncomment the line specified in the test to make it runnable
in the n/w server mode

Thanks
Manjula


On 2/9/07, Knut Anders Hatlen <Knut.Hatlen@sun.com> wrote:
>
> Manjula Kutty <manjula.kutty@gmail.com> writes:
>
> > Thanks Knut for your clarification. Please bear in mind that I don't
> know
> > much about cursor states. But my strong feeling is that it should behave
> > similar in both embedded and n/w server, other than the difference in
> the
> > SQL states. But please find the attached test (which is a miniature of
> the
> > CurrentOfTest.java), where I expect that cursor.getCursorName() should
> > return null. And it works as expected in the embedded mode. But in N/w
> > server it has a cursor name. Is that the correct behaviour?? If so
> please
> > give me some more inputs..
>
> I'm not sure what's the correct behaviour for getCursorName(). The
> JDBC spec is vague on this issue, but the JDBC API Tutorial and
> Reference, Third Edition says that it should return "the SQL name of
> the cursor associated with this ResultSet object; null if this
> ResultSet object is read-only and its cursor name has not been
> specified with the Statement.setCursorName method". It also says that
> "[if] a DBMS supports positioned update/delete, and if the method
> Statement.setCursorName has not been called to specify a cursor name,
> the JDBC driver or the underlying DBMS must generate a cursor name
> when a SELECT ... FOR UPDATE" statement is executed."
>
> So, according to the tutorial, the embedded driver behaves correctly,
> whereas the network client doesn't.
>
> --
> Knut Anders
>

Mime
View raw message