Checkboxes in SQL2005 DB - InfoPath Dev
in

InfoPath Dev

Checkboxes in SQL2005 DB

Last post 07-02-2009 07:01 AM by rhyatt. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-26-2009 07:48 AM

    • rhyatt
    • Not Ranked
    • Joined on 06-12-2009
    • Posts 9

    Checkboxes in SQL2005 DB

    OK I am new to creating forms in infopath. As a test I built a local DB on my wporkstation and created an infopath form. The form is used as a compouter build checklist. Some of the fields are just checkboxes. When I built a test form and DB on my computer everything worked fine. Data was submitted to the DB and when you run a query on that record everything displays correctly on the form. When I built the full production form and the DB on our SQL server it doesn't work. When you fill out the form the check appears in the box and it submits just fine, but if you pull up the record from a query the checkboxes are empty. When I look at the DB the fields do have data in them. So it is writing to the DB just not displaying the results correctly with a query. Any Ideas?

  • 07-01-2009 07:57 AM In reply to

    Re: Checkboxes in SQL2005 DB

    Hi -- this seems odd, doesn't it? Your checkbox controls -- do they set the value to true / false? Your database column, what data type is it? I'd set my checkbox controls to True / False and my SQL column to bit, myself.... Otherwise, I'd be on the lookout for issues regarding case, since 'yes' and 'Yes' are not considered equal, nor are 'true', 'True' and 'TRUE' -- usually when I've had a problem like this with a data bound form it has come down to something like this.

    Hilary Stoupa

  • 07-02-2009 07:01 AM In reply to

    • rhyatt
    • Not Ranked
    • Joined on 06-12-2009
    • Posts 9

    Re: Checkboxes in SQL2005 DB

    Originally I had the checkboxes set as a No/Yes. Based on your suggestion I set all the DB fields for the checkboxes to BIT and set the cleared/Checked state to False/True. Saved all the changes and tested. I pulled up all of the old records from the DB and placed a check in the appropriate boxes. Saved the records and then ran a query on them. Everything works perfectly now. The checkboxes stay checked and display correctly.

    Thanks for your help

    Ron

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.