I am collecting some values from a multiple select box.. posting to asp page.. looping through every value and doing<BR>an insert and an update for each one... the problem is that it is possible a value can be submitted twice, for example if "eq23" value is submitted twice, then i only want to do the update or insert the first time... <BR><BR>can i build up an array on the fly after executing the sql.. and then every loop check in array to see if the value has already had the update/insert done for it.. and if so not do the insert/update?<BR><BR>am i making sense?... code atm looks like this....<BR><BR>For each x in Request.Form("right")<BR> <BR> updateID = x<BR> isEq=InStr(1,updateID,"eq",0)<BR> <BR> if isEq &#060;&#062; 0 then &#039;do equipment update<BR> updateID = Replace(updateID, "eq", "") &#039;strip theeq at start<BR> objConn.execute("UPDATE tblEquipment SET iID = " & iID & ", eStatus = 4 WHERE eqID = " & updateID & ";")<BR> objConn.execute("INSERT INTO tblIncidentEquipmentLog (iID, iEvent, iDate, iEid) VALUES (" & iID & ",&#039;Dispatched&#039;,&#039;" & mDate & "&#039;,"& updateID & ");")<BR> else &#039; do a personnel update <BR> objConn.execute("UPDATE tblPerson SET iID = " & iID & ", pnStatus = 3 WHERE pnID = " & updateID & ";") <BR> objConn.execute("INSERT INTO tblIncidentPersonnelLog (iID, ipEvent, ipDate, iPID) VALUES ("& iID & ",&#039;Dispatched&#039;,&#039;" & mDate & "&#039;," & updateID & ");")<BR> end if<BR> <BR> next<BR>