?
Solved

JdbRadioButton does not post to database

Posted on 2003-11-06
4
Medium Priority
?
205 Views
Last Modified: 2010-05-18
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
Comment
Question by:paredes_mynor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 35

Assisted Solution

by:girionis
girionis earned 750 total points
ID: 9699799
 Does it return something else or nothing at all? Are you getting any error messages?
0
 

Author Comment

by:paredes_mynor
ID: 9703129
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
 

Author Comment

by:paredes_mynor
ID: 9704899
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
 
LVL 35

Accepted Solution

by:
girionis earned 750 total points
ID: 9706476
 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question