hi all, i've search my problem in some forum and try googling it but i can't find the right keyword. I hope you can help me.
I'm using sql server 2005 and combined with asp classic (vb).
I have a table with 3 column , the table itself is about airport tax. 3 column there : City, Airport, and Tax. What i want to do is sql update tax value column whenever admin press save button. sounds easy for me at first. Displaying every row in sql server smoothly and i think, the same goes for saving tax value.
so the query for update maybe like this it's in loop statement while rsTarif not eof:
strTarif="select * from airport_tax"
set rsTarif = objConn.execute(strTarif)
strUpdate="UPDATE airport_tax SET Tax="& request("txt|"& rsTarif("Tax")) &" WHERE City='"& rsTarif("City") &"' AND Airport='"& rsTarif("City") &"'"
query sounds good, since i have fulfill update (table_name) set value=(value filled in html form) where city= X and airport= Y (just to make sure to update every row).
i give some sql data for example
City Airport Tax
X Y 1000
A B 1500
C D 2000
E F 1000
when update query executed, i show the result to web page and the result is
update airport_tax set Tax=1000,1000 where city=X and airport=Y
update airport_tax set Tax=1500 where city=A and airport=B
update airport_tax set Tax=2000 where city=C and airport=D
update airport_tax set Tax=1000,1000 where city=E and airport=F
why the same value of tax get into the set Tax while the different one just fine?incorrect update syntax or incorrect loop?
i'm stuck at this, i can't debug since i don't know the problem. Thanks for all your help