CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 weird record behavior

Print topic Send  topic

Author Message
flipandboef


Posts: 107
Posted: 11/08/2006, 2:58 PM

ok, this one got me puzzled...
I have a table called "Members" within there is "SecurityLevel" that is a number (1-4)
Another table called "Security" that has "SecurityID" (number 1-4) and SecurityValue (text: admin / editor / designer / visitor)

In my Record that is designed to edit these Members, I have changed the "SecurityLevel" to a DropDown List in CodeCharge 3.
Then Left-Joined the other table Security.
Set the control source on "SecurityLevel" and BoundColumn is set to "SecurityID"
The TextColumn is set to SecurityValue...
Ok all works fine, can add new members and the value niceley comes over, but...
when I then edit the member and say his/her security level is set to Admin, I see Admin in the drop down list 2 times!!!
Checked the datase and there is nothing double stored...
Also when I change it to say Visitor, then Visitor shows up double in the drop down list...
Anyone any ideas what is going wrong?
View profile  Send private message
wkempees


Posts: 1679
Posted: 11/08/2006, 4:31 PM

LeftJoined, is the culprit word here.
Normaly you would have a form with SecurityLevel displayed.
In designer right click on that and ChangeTo ListBox.
Then re-click the newly created Listbox and in its properties
Select Connection, Table: Security, Bound Column: SecurityID and Text Column:SecurityValue.
That should be it, I don't understand the LeftJoin, re-read 3 times.
That Join could have a mistake in it and make double displays.

Walter


_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
flipandboef


Posts: 107
Posted: 11/09/2006, 9:33 AM

Ok, I have tried what you said but it did not work out as well..
Since it was not completely clear I will try to explain the situation in a different way.

I have a Member record, where I want to show a description on the SecurityLevel in a dropdown box so people can easy choose the security level.
Since in the table "Members" the security level is a number, I have created a second table "Security".
It basically looks likes this:

Table: Members
Field: SecurityLevel (Number / Long integer)

Table: Security
Field: SecurityID (AutoNumber / Primary key) -> Contains numbers 1 to 4
Field: SecurityValue (Text) -> Contains text: Visitor (= SecurityID: 1), Designer (=2), Editor (=3) and Admin (=4)

In CodeCharge made the Label a DropDown list with the folowing properties:
Control Source Type: Database Column
Control Source: SecurityLevel
Datasource: SecLevels, Members -> Here in the Query Builder, "SecurityLevels" is left joined to "Members". Details from this link is: SecurityId (table:SecLevels) equals(=) SecurityLevels (table: Members)

Bound Column: SecurityID
Text Column: SecurityValue

With this scenario, it works all fine, expept for the issue that when a member has the status 4 (=admin) or any other status, that statuslike for example Admin, will show up 2 times in the drop down list.
So that's basically my problem.
Also I noticed that sometimes it does seem to go fine, but it is displaying to the wrong value a member has, untill I do a refresh, so if anyone can help me out with any of these 2 issues.. please!

View profile  Send private message
Rene S
Posted: 11/09/2006, 10:12 AM

Hi,

Make the dropdown only with table "security" as datasource, not the query..

Rene
flipandboef


Posts: 107
Posted: 11/09/2006, 10:34 AM

Rene, you tha man!!
Whis worked like a charm, no more doubles! woohoo!!
Thanks!
Only thing left now is that i need to do a manual refresh in order to have the correct value being displayed.
I have 2 pages: MembersList and MembersMaintenance...
I open a member via the MemberList, change for example the now working ;-) Securitylevel from Admin to Editor.. Submit it, come back to my memberlist where again I open the same Member. At that point the SecurityLevel is still showing Admin, but it did update it (checked in the database). Once I hit the refresh button, voila! it shows the correct value.
Is there a way o automatically refresh this?
Again thanks so much for the help.
View profile  Send private message
flipandboef


Posts: 107
Posted: 11/09/2006, 12:04 PM

Well I got a work around in place.. after hours of searching i placed the following line into the head:
<meta http-equiv="expires" content="-1">
This works perfect.
I still think there must be a way within CodeCharge so if anyone has any idea, let me know.
View profile  Send private message
Oper


Posts: 1195
Posted: 11/10/2006, 8:26 AM

in ASP code:
response.expires = -1


http://www.GlobalDevelop.com
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
flipandboef


Posts: 107
Posted: 11/10/2006, 2:24 PM

Thanks!
View profile  Send private message

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.

MS Access to Web

Convert MS Access to Web.
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.