UPDATE sql HELP needed

D

David

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
 
D

daddywhite

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top