This topic is locked

Update a record

10/21/2008 11:38:15 AM
ASPRunnerPro General questions
C
carlobianchi author

two table
general

server

ack
rif

server

rif1

peso1 (integer)

ok1 (boolean)

rif2

peso2

ok2
After table rif was edit i need
ack = 'YES' if peso1ok1+peso2ok2 >=100
I DO
AFTEREDIT
if (select (dict(peso1)dict(OK1))+(dict(peso2)dict(OK2)) from rif )>=20
strSQLSave = "UPDATE general set acK = 'yes' where server = 'dict(server)'"
else
strSQLSave = "UPDATE generale set accetta = 'NO' where server = 'dict(server)'"

end
dbConnection.Execute strSQLSave
Could you help me with an exaple ?

J
Jane 10/24/2008

Hi,
here is an example:

if dict("peso1")dict("ok1")+dict("peso2")dict("ok2")>=100 then

strSQLSave = "UPDATE general set acK = 'yes' where server = '" & dict("server") & "'"

else

strSQLSave = "UPDATE generale set accetta = 'NO' where server = '" & dict("server") & "'"

end

dbConnection.Execute strSQLSave

C
carlobianchi author 10/29/2008

Hi,

here is an example:

C
carlobianchi author 10/29/2008

Hi, best regard for your example
I use this form :

if dict("peso1")dict("acc1")+ dict("peso2")dict("acc2")>=95 then

strSQLSave = "UPDATE generale set accettazione = 'SI' where server = '" & dict("server") & "'"

end if

strSQLSave = "UPDATE generale set accettazione = 'NO' where server = '" & dict("server") & "'"

dbConnection.Execute strSQLSave
It's quite ok becouse it pun NO if <95 but it not put YES if >= 95

do you know how can i print the calculation : dict("peso1")dict("acc1")+ dict("peso2")dict("acc2")
?

C
carlobianchi author 10/29/2008

sorry I'm a stupid

C
carlobianchi author 10/30/2008

sorry I'm a stupid


I've an other problem
I don't want the costumers can modify "peso1"

but dict("peso1") get the right value only if is possible to edit it
the right value of peso1 is 100

i try to define the field (edit) as as read only but in this case dict("peso1") return 0
?