• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

JdbRadioButton does not post to database

Hello.

I have a JdbRadioButton, associated with a boolean column in a table.

    jdbrb_Normal.setDataSet(q_ItemDef);
    jdbrb_Normal.setSelectedDataValue("True");
    jdbrb_Normal.setColumnName("ITEMTMODF");

It is supossed that when I make the q_ItemDef.saveChanges(), the field in the table is going to get the
q_ItemDef.getBoolean("ITEMTMODF") value of the query, but it doesn't.

Could you please help me with that.
Thank you.
0
paredes_mynor
Asked:
paredes_mynor
  • 2
  • 2
2 Solutions
 
girionisCommented:
 Does it return something else or nothing at all? Are you getting any error messages?
0
 
paredes_mynorAuthor Commented:
It's just that it doesn't update the field in the table.

The field in the table is of boolean type.  I don't receive any error.  Even other fields get updated, but that one doesn't.  It stays as null.
Thank you for your response.
0
 
paredes_mynorAuthor Commented:
I changed the field data type, I put it like integer.  Then I wrote

jdbrb_Normal.setSelectedDataValue("1") ;
jdbrb_Normal.setUnselectedDataValue("0") ;

After that, I enabled a action listener to jdbrb_Normal.  Every itemStateChange, the field in the query is updated.  I think it has to be a better way, so it can be updated directly, without the need of be aware of the itemStateChange.

Thks.
Mynor.
0
 
girionisCommented:
 You need to indicate that something has changed in order to update the field, otherwise how will the field know? I'd say you have a solution so don't bother about it any more. First thing in software enginering is to make things work and optimize later :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now