jrs3
Posts: 12
|
| Posted: 01/02/2007, 2:40 PM |
|
Noob question...(I apologize)
I have just added several fields to a CCS Project that is being used by 50+ users at present. One of the fields added is a checkbox. When the record is retrieved, the checkbox (if checked) does not reflect the user's update -- although if I view the database, it clearly captures the update.
(I know I'm opening myself up to quite a bit here, but....) What could I be doing incorrectly to prohibit the value from being returned? I have several other checkbox fields that are retrieved without error in the exact same fashion.
DB: Access
Front End: ASP
Propertries of Checkbox:
Name: Opt1
Visible: Yes
Control Source Type: Database Column
Control Source: Opt1
Data Type: Boolean
Is it that I'm adding fields after publishing the initial project? I certainly do not want to recreate the entire application over a checkbox....
Thanks in advance for all of your help!
|
 |
 |
TheunisP
Posts: 342
|
| Posted: 01/02/2007, 2:54 PM |
|
J, I had exactly the same problem an hour so back - 2 checkboxes - both correctly setup - the one just didn't work correctly - took the easy way out (since I knew I had it correct it had to be something in the generated code). Delete the control, save & generate (so it gets removed) add it back, gen. & publish.
Solved my problem - hope it works for you
|
 |
 |
jrs3
Posts: 12
|
| Posted: 01/03/2007, 4:08 AM |
|
Quote TheunisP:
J, I had exactly the same problem an hour so back - 2 checkboxes - both correctly setup - the one just didn't work correctly - took the easy way out (since I knew I had it correct it had to be something in the generated code). Delete the control, save & generate (so it gets removed) add it back, gen. & publish.
Solved my problem - hope it works for you
Thanks TheunisP...unfortunately, that doesn't seem to be resolving the issue
|
 |
 |
matheus
Posts: 386
|
| Posted: 01/03/2007, 4:26 AM |
|
Take a look at HTML generated to the checkbox.
Look if was {Checked} or {checked} , i remember a version that gives error.
Try change, and post here.
_________________
Matheus Trevizan
Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br |
 |
 |
jrs3
Posts: 12
|
| Posted: 01/03/2007, 5:39 AM |
|
Quote matheus:
Take a look at HTML generated to the checkbox.
Look if was {Checked} or {checked} , i remember a version that gives error.
Try change, and post here.
This does not seem to be the problem -- {checked} vs {Checked}. The code is the same for both the checkboxes that work vs those that do not:....
OPT1 FIELD DOES NOT WORK (writes to DB, but does not show/retrieve the update if user checks Opt1):
Set Opt1 = CCCreateControl(ccsCheckBox, "Opt1", Empty, ccsBoolean, DefaultBooleanFormat, CCGetRequestParam("Opt1", Method))
CREATED FIELD *DOES* WORK (writes to DB *and* correctly shows data when user retreives record)
Set Created = CCCreateControl(ccsCheckBox, "Created", Empty, ccsBoolean, DefaultBooleanFormat, CCGetRequestParam("Created", Method))
The other 12 check boxes on the form continue to retrieve the data fine; just the 2 additonal check boxes added yesterday to the DB and CCS front end do not show the updates.
|
 |
 |
TheunisP
Posts: 342
|
| Posted: 01/03/2007, 5:52 AM |
|
grabbing at straws:
1) you are absolutely sure that the control and the DB variable type is the same?
2) is the result of the update passed in the URL - perhaps you have hit a size limit (I think 4k is the limit) after you added the extra controls
3) haven't tested this yet isn't there perhaps a non CCS control with the same name which would result in an array being passed (if I remember correctly now)
|
 |
 |
TheunisP
Posts: 342
|
| Posted: 01/03/2007, 5:55 AM |
|
J, wait a sec - you say the correct data get's saved into the DB but the control when called up again (edit mode) doesn't reflect what is in the database?
|
 |
 |
jrs3
Posts: 12
|
| Posted: 01/03/2007, 6:15 AM |
|
Quote TheunisP:
J, wait a sec - you say the correct data get's saved into the DB but the control when called up again (edit mode) doesn't reflect what is in the database?
Correct.
Verified DB settings/connection...field type....etc...set up the exact same way as the other check boxes on the form.
|
 |
 |
TheunisP
Posts: 342
|
| Posted: 01/03/2007, 6:37 AM |
|
the only logical explanation is that it can't match the value in DB against what is checked/unchecked for that control (andf that even sounds shaky as an explanation)
Try deleting it copying another checkbox & pasting it - change the control datasource and see what happens
|
 |
 |
jrs3
Posts: 12
|
| Posted: 01/03/2007, 7:35 AM |
|
Quote TheunisP:
the only logical explanation is that it can't match the value in DB against what is checked/unchecked for that control (andf that even sounds shaky as an explanation)
Try deleting it copying another checkbox & pasting it - change the control datasource and see what happens
Tried that last night w/ first recommendation....
|
 |
 |
matheus
Posts: 386
|
| Posted: 01/03/2007, 7:55 AM |
|
Quote matheus:
Take a look at HTML generated to the checkbox.
Look if was {Checked} or {checked} , i remember a version that gives error.
Try change, and post here.
I say HTML code, not ASP code....
Edit: I will explain.
You can edit the DB value, so checkbox was ok in DataSource.
You're having problem with show DB values.
This is because HTML control cannot set checkbox to checked because didn't found exactly equal in HTML.
Try this.
_________________
Matheus Trevizan
Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br |
 |
 |
jrs3
Posts: 12
|
| Posted: 01/03/2007, 12:52 PM |
|
Thank you matheus. I appreciate the quick response; however the HTML code is the same as the rest of the working form...there is no checked/unchecked. Just checkbox value = 1 (same as all the others that are retrieved when retrieving/updating/editing a record.
<input name="{Opt1_Name}" type="checkbox" id="{Opt1_Name}" value="1" {Opt1} >
I've even re-created an entire page with the same result....obviously pilot error; but given that it's working for every other part of the form I remain stumped. I can open up the DB on the backend and see that the records are writing...but the HTML and ASP code remain the same for each option.
Still investigating....
|
 |
 |