CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 How do I update a control with a code generated value?

Print topic Send  topic

Author Message
dhodgdon

Posts: 80
Posted: 04/11/2005, 4:23 AM

I am using the Summ example to sum a grid column. I then calculate the average value using the summ value and the number of records in a table and assign that value to a label displayed in the grid.

I want to take that calculated average value and save it to a control in an MS Access table. I can't figure out a way to get the calculated value "up to the server" so that the ASP code will save it. I have tried using the execute function:

dbconnection.Execute("UPDATE sessions SET OverallQuality = Results.Average.value WHERE SessionName=" & dbconnection.ToSQL("TTD",ccsText))

but this doesn't save anything. Others have told me this is because the Results.Average.value is not available to the server because it is calculated for the client. I verified this by substituting an actual value in place of the calculated value in the expression and it saves fine.

Suggestions of other ways to calculate the average value of an MS Access database column and automatically update the control with it would be appreciated as well.
_________________
Regards,
David Hodgdon
View profile  Send private message
Oper


Posts: 1195
Posted: 04/11/2005, 8:30 AM

maybe just maybe
Overallquality is numeric/double or whatever and Results.Average.value
has some coma. (like 1,345.30).

also you could alwasy create a query for this using Access.

_________________
____________________________
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
dhodgdon

Posts: 80
Posted: 04/11/2005, 8:49 AM

Good idea but it is definitely not a syntax problem. I need some way to pass to the server a label (or some other control) that is calculated in a before show event and then update a table control (or another way to accompolish the same thing).

Not sure how to create a query in Access that will calculate the average of the column and have it available for display on the web page??? Any guidance would be appreciated.

_________________
Regards,
David Hodgdon
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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