CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Update based on form value

Print topic Send  topic

Author Message
ruby

Posts: 8
Posted: 11/29/2004, 6:31 AM

hi

can some one tell me how to do a update in the tabel based on form value

i have a text box field name :Qunatity
when a user has done an updated in the text box field then my sql statement should immediately update another column i.e

Status(column name) is O

when there is an update then Status must be changed to U

my code for this

Dim conn
Dim sql
Dim rs
set conn = new clsDBConnection1
conn.open


sql = "UPDATE Order set Status= 'U' WHERE Quantity = " & CCTOSQL(CCGetFromGet("Quantity",Empty),ccsFloat) & ""

conn.Execute(sql)


conn.close
set conn = Nothing

when i use GetParam it says that the varaible is undefined

i wrote this code in after submit event

can somebody help m e out in this situation

thanks in advance

regards
View profile  Send private message
ruby

Posts: 8
Posted: 11/30/2004, 1:50 AM

hi

can anybody help me out for my situation

regards


View profile  Send private message
peterr


Posts: 5971
Posted: 11/30/2004, 2:16 AM

I believe that CCS doesn't have After Submit event. Did you mean "On Submit"? Make sure you're using After Insert or After Update.
Also, CCGetFromGet may not work here but probably CCGetFromPost would.
Finally, debug and test your code - print the value of CCGetFromGet or CCGetFromPost before using it.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
ruby

Posts: 8
Posted: 11/30/2004, 4:17 AM

thanks peter

i am looking into it

regards
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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