Solved

JdbRadioButton does not post to database

Posted on 2003-11-06
4
198 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
  • 2
  • 2
4 Comments
 
LVL 35

Assisted Solution

by:girionis
girionis earned 250 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 250 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
noX challenge 17 76
array6 challenfge 6 64
array11 challenge 16 52
Which is the latest version of Apache Tomcatl 3 35
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now