<%@ Language=VBScript %> <% Option Explicit %> <% Response.Buffer = True 'First, we need to get the total number of items that could be updated Dim iCount iCount = Request("Count") 'We need to obtain each cost and ID Dim strCost, strID 'We will also need to build a SQL statement Dim strSQL Dim objConn Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString = "DSN=TestDB" objConn.Open 'Now, we want to loop through each form element Dim iLoop For iLoop = 0 to iCount strCost = Request(iLoop & ".Cost") strID = Request(iLoop & ".ID") strSQL = "UPDATE Products SET Cost = " & CDBl(strCost) & _ " WHERE ProductID = " & strID objConn.Execute strSQL Next objConn.Close Set objConn = Nothing Response.Redirect "ListProducts.asp" %>