CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Displaying data in ListBoxes and checkboxes

Print topic Send  topic

Author Message
Michelle
Posted: 01/09/2006, 10:21 AM

Okay, I started to post a question for help with my ListBoxes, but after double checking my database, I found some problems there so I have modified the database. Now my question has changed somewhat.

If the underlying structure of the database changes, do I need to do something special in Code Charge Studio to have it know about the changes? In this particular instance, I only changed some fields from char to varchar but I'm still not seeing what I want to see in my code charge pages.

What do I mean? Well, I have 3 list boxes on my page. Two do not work as I want them to but one does. The one that is working and showing me the data stored in the database is a varchar field (underlying database is SQL Server 2000). The two fields I can't get to show the data in are char fields - all fields inserted the desired data into the database but I can't get it to show the stored data when I revisit that record on my code charge page, so I changed all character data types to varchar in my database, but I still can't get them to display the data to me??

I've been messing with this stuff for a couple of days now and it is really driving me NUTS! Any advice, or help would be appreciated.

Also, I don't seem to be able to get my checkboxes to display data the way I want. For those, I have the checked value = 1 and unchecked = 0. It writes to my database correctly on the insert, but when I try to redisplay, it always shows unchecked (could this be because I have the default property value set to 0??)

:-< :-/
peterr


Posts: 5971
Posted: 01/09/2006, 1:28 PM

If you changed table or field names in the database then CCS has no way of finding such changes. You would need to modify all places in CCS project where previous fields were used.
If you changed only field type then you shouldn't need to do anything in CCS. However, I've seen some issues described on the forums where something got corrupted in CCS pages and one of the solutions was to change the control to something else, then back to the previous control type. So in your case try changing the listbox to a checkbox, then back to listbox. It could also help us if you'd backup your project before doing this, and if you are able to resolve the problem then email the previous corrupted page to the support.
Thanks.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Michelle
Posted: 01/09/2006, 2:25 PM

:*)

I don't really know what I did but it does seem to be pulling in the values for my listboxes now. I am still having difficulty getting the checkboxes to reflect the proper state now though?? I will save what I currently have so if I do get that working I will send you original and fixed states for your own reference.

Michelle
dragoon


Posts: 173
Posted: 01/09/2006, 3:07 PM

Quote peterr:
...However, I've seen some issues described on the forums where something got corrupted in CCS pages and one of the solutions was to change the control to something else, then back to the previous control type...

In this case, maybe you can introduce an action like 'Reset Component', in the next builds.
Triggering this will regenerate all necesary code for the componenet.
View profile  Send private message
peterr


Posts: 5971
Posted: 01/09/2006, 5:38 PM

draggon,
Probably not because if we can do that then we can fix the problem without such action. We just need to see a sample. Plus it's just theory for now since no one yet confirmed that such problem really exists.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
mljonzs

Posts: 124
Posted: 01/10/2006, 7:08 AM

Is the suggestion here that I try to change my checkboxes to say text fields then back again to see if they will start to display the correct state once retrieved? No matter what I've tried they show unchecked when I retrieve a record and the data indicates some of the boxes should be checked....

Michelle
_________________
What does not begin WITH God, will end in failure!
View profile  Send private message
mljonzs

Posts: 124
Posted: 01/10/2006, 10:56 AM

Okay, I finally figured out what I had done wrong. My checkboxes were text but I was using integer values thus they would always be unchecked when retrieved. Once I set the CheckedValue = "Y" and the Unchecked Value = "N". Things worked as I wanted them to.

:-D :-D :-D
_________________
What does not begin WITH God, will end in failure!
View profile  Send private message
mljonzs

Posts: 124
Posted: 01/11/2006, 12:03 PM

Peter -

I am wondering if you want me to send you my project in it's "before" state to look at. Here is what is happening - I have made a couple of modifications to the database - only changed size for some varchar fields - made them larger. I then go into my CCS3.0 project and adjust the max size on the affected fields but the only way I can get it to pick up the change is to change my field to say a list box and then back to a text box. This seems like a lot of work and you mentioned you would like a snapshot of my project before I made these changes.

You can email me if you want me to send you the project/code.
Thanks!
Michelle J.

_________________
What does not begin WITH God, will end in failure!
View profile  Send private message
peterr


Posts: 5971
Posted: 01/11/2006, 12:12 PM

Michelle,
That would be great. Could you please do a quick submission to support at http://support.yessoftware.com/support_new.asp and attach the project on the next page (after submitting the case).
Thanks.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
mljonzs

Posts: 124
Posted: 01/12/2006, 6:27 AM

Peter - I submitted support case #983918113 and included project files. I hope this helps.

Thanks!
Michelle
_________________
What does not begin WITH God, will end in failure!
View profile  Send private message
peterr


Posts: 5971
Posted: 01/12/2006, 11:18 AM

Great. Thank you!
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Pool
Posted: 02/13/2006, 3:02 PM


Quote :
Also, I don't seem to be able to get my checkboxes to display data the way I want. For those, I have the checked value = 1 and unchecked = 0. It writes to my database correctly on the insert, but when I try to redisplay, it always shows unchecked (could this be because I have the default property value set to 0??)

I am having a similar problem to this. I am using SQL server as database and the field is of type "bit". In order to do the updation correct, I have to keep the datatype of the checkbox to integer. But even when the field in the database is set to 1, the checkbox doesn't come up as "checked". I tried putting the value in a textbox with a datatype of integer and it displays "-1" instead of 1. I made the same textbox of type text and it displays "true" for 1 and "false" for 0.

Can anyone help me out with this ? As a workaround I have had to put up some custom code in the before show event of the checkbox. But I don't want it to be like that, I am sure there must be a better solution to this.

Thanks in advance,
Pool

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.