Solved

JdbRadioButton does not post to database

Posted on 2003-11-06
4
202 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 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java exception bubble up 2 24
by zero exception 10 69
Is there a simpler dropbox system? 10 44
Where to place postgres JDBC driver jar on tomcat 8 25
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
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 covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

735 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