UPDATE sql HELP needed

UPDATE sql HELP needed

am 24.09.2007 18:27:18 von davidgordon

Hi,

I have a form which displays all records for an ID NUMBER as an edit
page, where the user can edit 1 or 2 fields per record listed. I
wanted to let the user have the ability to edit any number of records
at once, rather than 1 at a time.
Once the user makes the changes to the fields, which are numbers, they
hit submit.

The 2 textfields on the form are called 'mqty' and 'mopen'
These are the same for all the records listed.

How do I run my update sql, to update the correct records ???

at present I have tried the following without success:


------------------------------------------------------------ -----

''''' this holds the number of records that were listed
for i = 1 to SESSION("count")


uSQL = "UPDATE phoenix_orderlines SET "
uSQL = uSQL & " P_metal_qty = '" & request.form("mqty") & "'"
uSQL = uSQL & ", P_metal_Open ='" & request.form("mopen") & "' "
uSQL = uSQL & " WHERE Phoenix_ID= '" & SESSION("PID") & "';"


Set RS = adoDataConn.Execute(uSQL)

next

------------------------------------------------------------ ----------

The above seems to update all records with the same info ?
I would appreciate any help you can offer

Thanks

David

Re: UPDATE sql HELP needed

am 24.09.2007 21:40:27 von daddywhite

I dont understand what your trying to do - what is Session("COUNT")
and Session("PID")? How are they relevant?