Hi,
I created a page whcih send to DATA the code is:(only part of the code)
<FORM action="EditPriority.asp" method=POST id=form1 name=form1>
<%
Response.Write "<td><INPUT type=""text"" id=""IdRight"" name=""IdRight"" size=5 value=" & rs("ID") & "></td>"
Response.Write "<td><INPUT type=""text""' id=""Priority"" name=""Priority"" size=1 value=" & rs("Priority") & "></td>"
rs.MoveNext
wend
At the other page I am trying to UPDATE me records:
<%
IdRight=Request.Form("IdRight")
set conn=server.CreateObject("ADODB.connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\WebSite\MagenLi\magenli.mdb"
If Len(Request.Form("Priority")) = 0 Then
Response.Write "You haven't selected any software, that makes me sad :("
Else
Response.Write "You have selected the following software: <br />"
Dim t_soft
For each t_soft in Request.Form("Priority")
For each t_id in Request.Form("IdRight")
conn.Execute "UPDATE RightMenu SET Priority='" & t_soft & "' where id=" & t_id
next
Next
End If
conn.Close
set conn=nothing
%>
The code is not working fine becasue the second FOR command is wrong becasue I need to update every id's record and this code updates all the record with the same data
I understand why it's happend, how can I move the next id without the for command?