Board index » jbuilder » Cant make 2 changes, only one is possible

Cant make 2 changes, only one is possible


2003-10-21 02:33:48 PM
jbuilder10
Jbuilder Database can NOT make 2 changes to a record programatically
(ie without typing in the fields)
Example:
String s1 = "1.23";
String s2 = "4.56";
dbc1.requestFocus();
dbc1.setText(s1);
dbc2.requestFocus();
dbc2.setText(s2);
===================================================
dbc1 is NOT changed
dbc2 is changed
I can force both changes to occur by going next, prior:
eg
dbc1.requestFocus();
dbc1.setText(s1);
dtable.next();
dtable.prior();
dbc2.requestFocus();
dbc2.setText(s2);
=====================================================
Both changes are effected.
There must be a less cheesy method to tickle the database so
multiple changes can be effected without typing..
some sort of
"dtable.stickthe lastchangeplease()"
 
 

Re:Cant make 2 changes, only one is possible

OK so sending text to a data-aware component is NOT the way to
modufy a database
better to do:
table.setDouble("colname",doublevalue);
// simple!
I plan to avoid RequestFocus, it can lead to galloping focus jumping...