&#060;apologies for accidental cross-post&#062;<BR><BR>Hi,<BR><BR>I have a simple updating query stored in access that accepts 3 paramteters. <BR>The first parameter contains the id of the record to be updated. The second <BR>parameter accepts an integer which is added to the current value of its corresponding field (viewCount), and the third parameter accepts a timestamp. <BR><BR>Basically i have an array of values to be passed to this query and using the code below i was attempting to loop through the array, executing the query for each row of values.<BR><BR>Unfortunately it doesnt work properly. Everything goes okay in the first iteration, but in all subsequent interations, the record id parameter seems to be ignored so that only the first record is updated.<BR><BR>If i ditch the query/parameter idea and just use an SQL statement in the loop it works fine, only problem is i have to use query/parameter method.<BR> <BR>Any help, ideas, spotting of blatant errors and laughing at me - appreciated!<BR><BR><BR>Code:<BR>--------------------------------------------------<BR><BR>Set objCmd = Server.CreateObject ("adodb.command")<BR><BR>with objCmd <BR> .ActiveConnection = objConn .CommandText = internal_QueryName <BR> .CommandType = adCmdStoredProc<BR><BR> .Parameters.Append .CreateParameter ("pArticleID", adBigInt, adParamInput) <BR> .Parameters.Append .CreateParameter ("pHitCount", adBigInt, adParamInput) <BR> .Parameters.Append .CreateParameter ("pDate", adDate, adParamInput)<BR><BR> for j = 0 to ubound (application("arrHits"), 2)<BR> .Parameters("pArticleID") = application("arrHits")(0, j)<BR> .Parameters("pHitCount") = application("arrHits")(1, j)<BR> .Parameters("pDate") = application("arrHits")(2, j) <BR> .Execute lngRec, , adExecuteNoRecords <BR> internal_UpdateCount = internal_UpdateCount + lngRec <BR> next<BR> <BR> .ActiveConnection = nothing <BR>end with<BR><BR>--------------------------------------------------<BR>SQL in Query:<BR>--------------------------------------------------<BR><BR>PARAMETERS pArticleID Long, pHitCount Long, pDate DateTime;<BR>UPDATE views SET viewCount = viewCount + pHitCount, lastView = pDate<BR>WHERE articleID = pArticleID;<BR><BR>--------------------------------------------------<BR><BR><BR>