You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Veaceslav Chicu <cs...@infologic.fr> on 2005/10/05 23:06:03 UTC

updatable resultSet

Hello,

why this is not working?
PreparedStatement st = conn.prepareStatement(					"select person_id,
name, surname from tiers.person for update",		
ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
...
rs.setObject(1, "aaa");
rs.updateRow();

in embeded mode?

I have a tableModel for JTable, so I can't directly use it with result
set, any ideas?

thank you,
Slavic
P.S. I don't want to use, hibernate, ejb, custom cache, I need as thin
as possible swing client, is this possible?

Re: updatable resultSet

Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
Hi,

I notice the current forward only, updatable implementation does not
do prefetch from the network client driver, hence removing a need to
move backwards when perfoming an update in the middle of a prefetch
set.

It seems a main problem with implementing scrollable sensitive result
sets is being able to scan backwards (both heap and btree). Can
somebody cast some light on what, if any, underlying assumptions would
make this hard?

Mike, can you comment on this perhaps?

Thanks,
Dag

Re: updatable resultSet

Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
>>>>> "Kathey" == Kathey Marsden <km...@sbcglobal.net> wrote:

Fernanda and I have started looking at this feature. If anybody is
interested on working on it with us, we'd welcome any help :)

At the outset, we would appreciate to hear of any obstacles (other
than locators) people may know about. Apart from the client/server
aspect, what aspect would likely be more challenging in embedded
Derby? Would adding insert to forward-only result sets be a useful
step in the right direction? In contrast to read-only scrollable
result sets, updatable result sets must be sensitive (changes by other
transactions are seen), so the current solution for scrollability
may not be what we need (?).

Dag

Kathey> Sure there is a chance.  As Dan always says,  it's software, we can do
Kathey> anything we want.  All we need is someone to do the work.   I am not
Kathey> sure even if there is a  Jira entry for this one even though it is
Kathey> listed as a limitation in the documentation,  so checking Jira and
Kathey> filing an issue if it is not there, would be an excellent place for you
Kathey> to start.  If you are not quite prepared to implement this feature
Kathey> yourself,  also very helpful would be to  identify existing tests  or
Kathey> write new ones which run against embedded and can be used to test this
Kathey> feature and at least start researching an implementation strategy.   I
Kathey> bet there are other folks who are interested in this feature that might
Kathey> be willing to help out if you get the ball rolling.
Kathey> 
Kathey> Currently, we do not have large object locators  (DERBY-208) and I think
Kathey> that is a prerequisite for this feature.   Large objects are
Kathey> materialized on the client which is a big issue and not just for for
Kathey> scrollable cursors.   
Kathey> 
Kathey> Kathey
Kathey> 
Kathey> 
-- 
Dag H. Wanvik
Sun Microsystems, Web Services, Database Technology Group
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax:  +47 73842101

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact
the sender by reply email and destroy all copies of the original
message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

Re: updatable resultSet

Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
Hi Kathey,

>>>>> "Kathey" == Kathey Marsden <km...@sbcglobal.net> wrote:

Kathey> DERBY-605 currently seems to combine several issues and its summary is
Kathey> not that descriptive of  what needs implementation.
Kathey> I wonder should we have multiple  Jira entries that match the
Kathey> functionality that needs implementation, one  for scrollable ResultSets
Kathey> for large objects with  client, another for updatable ResultSets for
Kathey> large objects with client,  etc.    Dag what are the various issues that
Kathey> you see here, and how would you recommend breaking them up in Jira?
Kathey> 
Kathey> 
Kathey> FYI, here is the doc page with the differences between client and
Kathey> embedded for  updatable ResultSets.
Kathey> http://db.apache.org/derby/docs/10.1/adminguide/radminappsresultsetdiffs.html

Yes, I agree with you, we need to break this (JIRA-605) down in several
issues. Here is one way:
	
	1 Forward-only updatable, update: 
	  1.1 c/s: lobs
	2 Forward-only updatable, update: 
	  2.1 c/s: remaining problems in update{String, Bytes, Time, Object}  
	
	3 Forward-only updatable, insert: now JIRA-100 , could split this in three:
	  3.1 embedded
	  3.2 c/s minus lobs
	  3.3 c/s lobs

	4 scrollable updatable sensitive
	  4.1 embedded (incl lobs)
	  4.2 c/s minus lobs
	  4.3 c/s lobs

        5 scrollable updatable insensitive (if we ever want do that)

I would assume 3.1 and 4.1 could include lobs. We can cross-link all
of these to 605.  Does 2.1 need splitting? Maybe Mamta can comment on
that?  Scrollable updatable (4.2) will face the problems under 2.1 also,
but any solution should carry over, I suppose.
Also, a solution to 1.1 should apply to 4.3. I think it is still ok to
keep these as separate issues.

I think some exisiting JIRA issues touch on one or more of these (in
addition to 100 and 506, I'll start looking...)

Once we get these organized I can post an overview on the Wiki.

What do you think?

Thanks,
Dag

Re: updatable resultSet

Posted by Kathey Marsden <km...@sbcglobal.net>.
Dag H. Wanvik wrote:

>Hi Veaceslav,
>
>  
>
>>>>>>"Veaceslav" == Veaceslav Chicu <cs...@infologic.fr> wrote:
>>>>>>            
>>>>>>
>Veaceslav> 
>Veaceslav> it's about simple tables, with text, numeric fields
>Veaceslav> I want to scoll and change rows,
>Veaceslav> 
>Veaceslav> 
>Veaceslav> rezults conform to isolation levels
>
>In the example you provided in the bug you filed
>(http://issues.apache.org/jira/browse/DERBY-605), you used
>TYPE_SCROLL_INSENSITIVE. This would give extra isolation (think
>snapshot), in addition to that provided by SQL's isolation
>levels. Actually, SQL prohibits insensitive scrollable cursors in
>combination with update, although JDBC allows it, because some vendors
>support it. Sensitive result sets makes changes made by other
>transactions visible in the result set. If you just want the isolation
>provided by SQL, you would want to use TYPE_SCROLL_SENSITIVE.
>
>For Derby, we will probably want to build sensitive (first), to be SQL
>compliant.
>
>Dag
>  
>
DERBY-605 currently seems to combine several issues and its summary is
not that descriptive of  what needs implementation.
I wonder should we have multiple  Jira entries that match the
functionality that needs implementation, one  for scrollable ResultSets
for large objects with  client, another for updatable ResultSets for
large objects with client,  etc.    Dag what are the various issues that
you see here, and how would you recommend breaking them up in Jira?


FYI, here is the doc page with the differences between client and
embedded for  updatable ResultSets.
http://db.apache.org/derby/docs/10.1/adminguide/radminappsresultsetdiffs.html

Kathey


Re: updatable resultSet

Posted by Veaceslav Chicu <cs...@infologic.fr>.
it's good with sensitive too

Slavic

Dag H. Wanvik wrote:
> Hi Veaceslav,
> 
> 
>>>>>>"Veaceslav" == Veaceslav Chicu <cs...@infologic.fr> wrote:
> 
> Veaceslav> 
> Veaceslav> it's about simple tables, with text, numeric fields
> Veaceslav> I want to scoll and change rows,
> Veaceslav> 
> Veaceslav> 
> Veaceslav> rezults conform to isolation levels
> 
> In the example you provided in the bug you filed
> (http://issues.apache.org/jira/browse/DERBY-605), you used
> TYPE_SCROLL_INSENSITIVE. This would give extra isolation (think
> snapshot), in addition to that provided by SQL's isolation
> levels. Actually, SQL prohibits insensitive scrollable cursors in
> combination with update, although JDBC allows it, because some vendors
> support it. Sensitive result sets makes changes made by other
> transactions visible in the result set. If you just want the isolation
> provided by SQL, you would want to use TYPE_SCROLL_SENSITIVE.
> 
> For Derby, we will probably want to build sensitive (first), to be SQL
> compliant.
> 
> Dag
> 
> Veaceslav> 
> Veaceslav> best regards,
> Veaceslav> Slavic
> Veaceslav> 
> Veaceslav> 
> Veaceslav> Satheesh Bandaram wrote:
> Veaceslav> > Looks like we are talking about two different issues. I meant to reply
> Veaceslav> > to another thread that asked about scrollable cursors and large objects:
> Veaceslav> > 
> Veaceslav> > http://mail-archives.apache.org/mod_mbox/db-derby-user/200510.mbox/%3c4342312E.600@nuix.com.au%3e
> Veaceslav> > 
> Veaceslav> > Satheesh
> Veaceslav> > 
> Veaceslav> > Veaceslav Chicu wrote:
> Veaceslav> > 
> Veaceslav> >>DERBY-605
> Veaceslav> >>
> Veaceslav> >>maybe someone can reformulate this
> Veaceslav> >>
> Veaceslav> >>I tried in embeded mode it doesn't scroll and update
> Veaceslav> >>I have not much free time now, I can help testing
> Veaceslav> >>
> Veaceslav> >>Slavic
> Veaceslav> >>
> Veaceslav> >>Satheesh Bandaram wrote:
> Veaceslav> >>  
> Veaceslav> >>
> Veaceslav> >>>I am also willing to help anyone interested in enhancing Derby to
> Veaceslav> >>>support this.
> Veaceslav> >>>
> Veaceslav> >>>Kathey Marsden wrote:
> Veaceslav> >>>
> Veaceslav> >>>
> Veaceslav> >>>    
> Veaceslav> >>>
> Veaceslav> >>>>Currently, we do not have large object locators  (DERBY-208) and I think
> Veaceslav> >>>>that is a prerequisite for this feature.   
> Veaceslav> >>>>
> Veaceslav> >>>>      
> Veaceslav> >>>>
> Veaceslav> >>>While adding large object locators would be a great thing for Derby,
> Veaceslav> >>>wondering if there is any way to implement this without locators. Since
> Veaceslav> >>>embedded driver is able to support scrollable cursors with large
> Veaceslav> >>>objects, would it be possible to expose this through network
> Veaceslav> >>>server/client, even if large objects need to be materialized on the
> Veaceslav> >>>client? I am willing to help enhance Derby Client side, which may be the
> Veaceslav> >>>easy part. :-)
> Veaceslav> >>>
> Veaceslav> >>>Large object locators have many other usages too, so these are good to
> Veaceslav> >>>consider at sometime.
> Veaceslav> >>>
> Veaceslav> >>>Satheesh
> Veaceslav> >>>
> Veaceslav> >>>
> Veaceslav> >>>    
> Veaceslav> >>>
> Veaceslav> >>>>Large objects are
> Veaceslav> >>>>materialized on the client which is a big issue and not just for for
> Veaceslav> >>>>scrollable cursors.   
> Veaceslav> >>>>
> Veaceslav> >>>>Kathey
> Veaceslav> >>>>
> Veaceslav> >>>>
> Veaceslav> >>>>
> Veaceslav> >>>>
> Veaceslav> >>>>
> Veaceslav> >>>>
> Veaceslav> >>>>      
> Veaceslav> >>>>
> Veaceslav> >>>
> Veaceslav> >>>    
> Veaceslav> >>>
> Veaceslav> >>
> Veaceslav> >>
> Veaceslav> >>
> Veaceslav> >>  
> Veaceslav> >>
> Veaceslav> 


Re: updatable resultSet

Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
Hi Veaceslav,

>>>>> "Veaceslav" == Veaceslav Chicu <cs...@infologic.fr> wrote:
Veaceslav> 
Veaceslav> it's about simple tables, with text, numeric fields
Veaceslav> I want to scoll and change rows,
Veaceslav> 
Veaceslav> 
Veaceslav> rezults conform to isolation levels

In the example you provided in the bug you filed
(http://issues.apache.org/jira/browse/DERBY-605), you used
TYPE_SCROLL_INSENSITIVE. This would give extra isolation (think
snapshot), in addition to that provided by SQL's isolation
levels. Actually, SQL prohibits insensitive scrollable cursors in
combination with update, although JDBC allows it, because some vendors
support it. Sensitive result sets makes changes made by other
transactions visible in the result set. If you just want the isolation
provided by SQL, you would want to use TYPE_SCROLL_SENSITIVE.

For Derby, we will probably want to build sensitive (first), to be SQL
compliant.

Dag

Veaceslav> 
Veaceslav> best regards,
Veaceslav> Slavic
Veaceslav> 
Veaceslav> 
Veaceslav> Satheesh Bandaram wrote:
Veaceslav> > Looks like we are talking about two different issues. I meant to reply
Veaceslav> > to another thread that asked about scrollable cursors and large objects:
Veaceslav> > 
Veaceslav> > http://mail-archives.apache.org/mod_mbox/db-derby-user/200510.mbox/%3c4342312E.600@nuix.com.au%3e
Veaceslav> > 
Veaceslav> > Satheesh
Veaceslav> > 
Veaceslav> > Veaceslav Chicu wrote:
Veaceslav> > 
Veaceslav> >>DERBY-605
Veaceslav> >>
Veaceslav> >>maybe someone can reformulate this
Veaceslav> >>
Veaceslav> >>I tried in embeded mode it doesn't scroll and update
Veaceslav> >>I have not much free time now, I can help testing
Veaceslav> >>
Veaceslav> >>Slavic
Veaceslav> >>
Veaceslav> >>Satheesh Bandaram wrote:
Veaceslav> >>  
Veaceslav> >>
Veaceslav> >>>I am also willing to help anyone interested in enhancing Derby to
Veaceslav> >>>support this.
Veaceslav> >>>
Veaceslav> >>>Kathey Marsden wrote:
Veaceslav> >>>
Veaceslav> >>>
Veaceslav> >>>    
Veaceslav> >>>
Veaceslav> >>>>Currently, we do not have large object locators  (DERBY-208) and I think
Veaceslav> >>>>that is a prerequisite for this feature.   
Veaceslav> >>>>
Veaceslav> >>>>      
Veaceslav> >>>>
Veaceslav> >>>While adding large object locators would be a great thing for Derby,
Veaceslav> >>>wondering if there is any way to implement this without locators. Since
Veaceslav> >>>embedded driver is able to support scrollable cursors with large
Veaceslav> >>>objects, would it be possible to expose this through network
Veaceslav> >>>server/client, even if large objects need to be materialized on the
Veaceslav> >>>client? I am willing to help enhance Derby Client side, which may be the
Veaceslav> >>>easy part. :-)
Veaceslav> >>>
Veaceslav> >>>Large object locators have many other usages too, so these are good to
Veaceslav> >>>consider at sometime.
Veaceslav> >>>
Veaceslav> >>>Satheesh
Veaceslav> >>>
Veaceslav> >>>
Veaceslav> >>>    
Veaceslav> >>>
Veaceslav> >>>>Large objects are
Veaceslav> >>>>materialized on the client which is a big issue and not just for for
Veaceslav> >>>>scrollable cursors.   
Veaceslav> >>>>
Veaceslav> >>>>Kathey
Veaceslav> >>>>
Veaceslav> >>>>
Veaceslav> >>>>
Veaceslav> >>>>
Veaceslav> >>>>
Veaceslav> >>>>
Veaceslav> >>>>      
Veaceslav> >>>>
Veaceslav> >>>
Veaceslav> >>>    
Veaceslav> >>>
Veaceslav> >>
Veaceslav> >>
Veaceslav> >>
Veaceslav> >>  
Veaceslav> >>
Veaceslav> 
-- 
Dag H. Wanvik
Sun Microsystems, Web Services, Database Technology Group
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax:  +47 73842101

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact
the sender by reply email and destroy all copies of the original
message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

Re: updatable resultSet

Posted by Veaceslav Chicu <cs...@infologic.fr>.
it's about simple tables, with text, numeric fields

I want to scoll and change rows,


rezults conform to isolation levels

best regards,
Slavic


Satheesh Bandaram wrote:
> Looks like we are talking about two different issues. I meant to reply
> to another thread that asked about scrollable cursors and large objects:
> 
> http://mail-archives.apache.org/mod_mbox/db-derby-user/200510.mbox/%3c4342312E.600@nuix.com.au%3e
> 
> Satheesh
> 
> Veaceslav Chicu wrote:
> 
>>DERBY-605
>>
>>maybe someone can reformulate this
>>
>>I tried in embeded mode it doesn't scroll and update
>>I have not much free time now, I can help testing
>>
>>Slavic
>>
>>Satheesh Bandaram wrote:
>>  
>>
>>>I am also willing to help anyone interested in enhancing Derby to
>>>support this.
>>>
>>>Kathey Marsden wrote:
>>>
>>>
>>>    
>>>
>>>>Currently, we do not have large object locators  (DERBY-208) and I think
>>>>that is a prerequisite for this feature.   
>>>>
>>>>      
>>>>
>>>While adding large object locators would be a great thing for Derby,
>>>wondering if there is any way to implement this without locators. Since
>>>embedded driver is able to support scrollable cursors with large
>>>objects, would it be possible to expose this through network
>>>server/client, even if large objects need to be materialized on the
>>>client? I am willing to help enhance Derby Client side, which may be the
>>>easy part. :-)
>>>
>>>Large object locators have many other usages too, so these are good to
>>>consider at sometime.
>>>
>>>Satheesh
>>>
>>>
>>>    
>>>
>>>>Large objects are
>>>>materialized on the client which is a big issue and not just for for
>>>>scrollable cursors.   
>>>>
>>>>Kathey
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>      
>>>>
>>>
>>>    
>>>
>>
>>
>>
>>  
>>


Re: updatable resultSet

Posted by Veaceslav Chicu <cs...@infologic.fr>.
DERBY-605

maybe someone can reformulate this

I tried in embeded mode it doesn't scroll and update
I have not much free time now, I can help testing

Slavic

Satheesh Bandaram wrote:
> I am also willing to help anyone interested in enhancing Derby to
> support this.
> 
> Kathey Marsden wrote:
> 
> 
>>Currently, we do not have large object locators  (DERBY-208) and I think
>>that is a prerequisite for this feature.   
>>
> 
> While adding large object locators would be a great thing for Derby,
> wondering if there is any way to implement this without locators. Since
> embedded driver is able to support scrollable cursors with large
> objects, would it be possible to expose this through network
> server/client, even if large objects need to be materialized on the
> client? I am willing to help enhance Derby Client side, which may be the
> easy part. :-)
> 
> Large object locators have many other usages too, so these are good to
> consider at sometime.
> 
> Satheesh
> 
> 
>>Large objects are
>>materialized on the client which is a big issue and not just for for
>>scrollable cursors.   
>>
>>Kathey
>>
>>
>>
>>
>> 
>>
> 
> 
> 


Re: updatable resultSet

Posted by Satheesh Bandaram <sa...@Sourcery.Org>.
I am also willing to help anyone interested in enhancing Derby to
support this.

Kathey Marsden wrote:

>Currently, we do not have large object locators  (DERBY-208) and I think
>that is a prerequisite for this feature.   
>
While adding large object locators would be a great thing for Derby,
wondering if there is any way to implement this without locators. Since
embedded driver is able to support scrollable cursors with large
objects, would it be possible to expose this through network
server/client, even if large objects need to be materialized on the
client? I am willing to help enhance Derby Client side, which may be the
easy part. :-)

Large object locators have many other usages too, so these are good to
consider at sometime.

Satheesh

>Large objects are
>materialized on the client which is a big issue and not just for for
>scrollable cursors.   
>
>Kathey
>
>
>
>
>  
>


Re: updatable resultSet

Posted by Kathey Marsden <km...@sbcglobal.net>.
Veaceslav Chicu wrote:

>in embeded environement this works?
>
>so no chanses to see this working in derby?
>
>  
>
Sure there is a chance.  As Dan always says,  it's software, we can do
anything we want.  All we need is someone to do the work.   I am not
sure even if there is a  Jira entry for this one even though it is
listed as a limitation in the documentation,  so checking Jira and
filing an issue if it is not there, would be an excellent place for you
to start.  If you are not quite prepared to implement this feature
yourself,  also very helpful would be to  identify existing tests  or
write new ones which run against embedded and can be used to test this
feature and at least start researching an implementation strategy.   I
bet there are other folks who are interested in this feature that might
be willing to help out if you get the ball rolling.

Currently, we do not have large object locators  (DERBY-208) and I think
that is a prerequisite for this feature.   Large objects are
materialized on the client which is a big issue and not just for for
scrollable cursors.   

Kathey



Re: updatable resultSet

Posted by Veaceslav Chicu <cs...@infologic.fr>.
in embeded environement this works?

so no chanses to see this working in derby?

best regards,
Slavic

Satheesh Bandaram wrote:
> I believe it is by design... Current Derby Network server and/or client
> needs to be enhanced to support this. Kathey Marsden may have more info
> on this.
> 
> Would it be possible to use FORWARD_ONLY cursors and issue a direct
> update SQL statement to update the rows? May need a way to uniquely
> identify the row in the base table. Any other ideas for workaround?
> 
> Satheesh
> 
> Veaceslav Chicu wrote:
> 
>>it's difficult to support updatable scrollable cursors?
>>it's by design?
>>
>>
>>thank you,
>>Slavic
>>
>>Q2: Does DB2 UDB V8 support updatable scrollable cursors?
>>
>>A2: Updatable scrollable cursors are supported using the Universal JDBC
>>drivers in DB2 UDB V8.1. If you are using DB2 UDB for Linux, UNIX, and
>>Windows v7.x, then you can use the legacy/CLI drivers and the
>>setCursorName APIs to simulate updatable scrollable cursors. We
>>recommend that you migrate to the Universal JDBC driver.
>>
>>
>>
>>Veaceslav Chicu wrote:
>>  
>>
>>>why derby don't support other types?
>>>JTable want to scroll and update
>>>
>>>I can't do such a simple application?
>>>
>>>I want an simple updatable table with gui, how can I do it?
>>>2.000.000 rows in the database
>>>
>>>is this possible? any ideas?
>>>jdk 1.5
>>>
>>>Slavic
>>>
>>>Knut Anders Hatlen wrote:
>>>
>>>    
>>>
>>>>Veaceslav Chicu <cs...@infologic.fr> writes:
>>>>
>>>>
>>>>
>>>>      
>>>>
>>>>>Hello,
>>>>>
>>>>>why this is not working?
>>>>>PreparedStatement st = conn.prepareStatement("select person_id,
>>>>>name, surname from tiers.person for update",		
>>>>>ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
>>>>>...
>>>>>rs.setObject(1, "aaa");
>>>>>rs.updateRow();
>>>>>
>>>>>in embeded mode?
>>>>>        
>>>>>
>>>>Derby only supports forward-only updatable result sets. If you don't
>>>>need a scrollable result set, try the following:
>>>>
>>>> conn.prepareStatement("select ... for update",
>>>>                       ResultSet.TYPE_FORWARD_ONLY,
>>>>                       ResultSet.CONCUR_UPDATABLE);
>>>>
>>>>      
>>>>
>>>
>>>    
>>>
>>
>>
>>
>>  
>>


Re: updatable resultSet

Posted by Veaceslav Chicu <cs...@infologic.fr>.
it's difficult to support updatable scrollable cursors?
it's by design?


thank you,
Slavic

Q2: Does DB2 UDB V8 support updatable scrollable cursors?

A2: Updatable scrollable cursors are supported using the Universal JDBC
drivers in DB2 UDB V8.1. If you are using DB2 UDB for Linux, UNIX, and
Windows v7.x, then you can use the legacy/CLI drivers and the
setCursorName APIs to simulate updatable scrollable cursors. We
recommend that you migrate to the Universal JDBC driver.



Veaceslav Chicu wrote:
> why derby don't support other types?
> JTable want to scroll and update
> 
> I can't do such a simple application?
> 
> I want an simple updatable table with gui, how can I do it?
> 2.000.000 rows in the database
> 
> is this possible? any ideas?
> jdk 1.5
> 
> Slavic
> 
> Knut Anders Hatlen wrote:
> 
>>Veaceslav Chicu <cs...@infologic.fr> writes:
>>
>>
>>
>>>Hello,
>>>
>>>why this is not working?
>>>PreparedStatement st = conn.prepareStatement("select person_id,
>>>name, surname from tiers.person for update",		
>>>ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
>>>...
>>>rs.setObject(1, "aaa");
>>>rs.updateRow();
>>>
>>>in embeded mode?
>>
>>
>>Derby only supports forward-only updatable result sets. If you don't
>>need a scrollable result set, try the following:
>>
>>  conn.prepareStatement("select ... for update",
>>                        ResultSet.TYPE_FORWARD_ONLY,
>>                        ResultSet.CONCUR_UPDATABLE);
>>
> 
> 
> 


Re: updatable resultSet

Posted by Veaceslav Chicu <cs...@infologic.fr>.
why derby don't support other types?
JTable want to scroll and update

I can't do such a simple application?

I want an simple updatable table with gui, how can I do it?
2.000.000 rows in the database

is this possible? any ideas?
jdk 1.5

Slavic

Knut Anders Hatlen wrote:
> Veaceslav Chicu <cs...@infologic.fr> writes:
> 
> 
>>Hello,
>>
>>why this is not working?
>>PreparedStatement st = conn.prepareStatement("select person_id,
>>name, surname from tiers.person for update",		
>>ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
>>...
>>rs.setObject(1, "aaa");
>>rs.updateRow();
>>
>>in embeded mode?
> 
> 
> Derby only supports forward-only updatable result sets. If you don't
> need a scrollable result set, try the following:
> 
>   conn.prepareStatement("select ... for update",
>                         ResultSet.TYPE_FORWARD_ONLY,
>                         ResultSet.CONCUR_UPDATABLE);
> 


Re: updatable resultSet

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Veaceslav Chicu <cs...@infologic.fr> writes:

> Hello,
>
> why this is not working?
> PreparedStatement st = conn.prepareStatement("select person_id,
> name, surname from tiers.person for update",		
> ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
> ...
> rs.setObject(1, "aaa");
> rs.updateRow();
>
> in embeded mode?

Derby only supports forward-only updatable result sets. If you don't
need a scrollable result set, try the following:

  conn.prepareStatement("select ... for update",
                        ResultSet.TYPE_FORWARD_ONLY,
                        ResultSet.CONCUR_UPDATABLE);

-- 
Knut Anders