Please help. I have this code that worked fine in MS SQL. Now I just ported over to mySQL and it is changing the fields I update maybe the first time and deleting all others. Then another time it may hang until it times out. But it changes what I originally changed and deleting all others as well.

The first page is simply a form that pulls records from the db and displays then in a form. The name in each row is "price" + counter as in price1, price2, price3 etc...

now here is the exec code on the second page.

<%'Modify Prices Exec%>
'includes deleted for this post
' get settings
pDecimalSign = getSettingKey("pDecimalSign")
pChangeDecimalPoint = getSettingKey("pChangeDecimalPoint")
pVendorCode =request.form("pVendor")

dim mySQL, connTemp, rstemp, counter
counter = 1

'get all values in current vendor ID
mySQL="SELECT sku,idProduct, price, listPrice, bToBPrice, cost FROM products WHERE idSupplier=" &pVendorCode &" ORDER BY sku"
call getFromDatabaseUpdate(mySQL, rstemp, "bulkUpdatePricesExec.asp")

do while not rstemp.eof

pIdProduct = request.form("idProduct" & counter)

if (pIdProduct = rstemp("idProduct")) then
response.redirect "message.asp?message="& Server.Urlencode("ERROR - Product ID's do not match!-" &pIdProduct &"-"& rstemp2("idProduct")&"-")
end if

pCostPrice = request.form("cost" & counter)
pCostPrice = money(pCostPrice)

pListPrice = request.form("list" & counter)
pListPrice = money(pListPrice)

pPrice = request.form("price" & counter)
pPrice = money(pPrice)

pClubPrice = request.form("club" & counter)
pClubPrice = money(pClubPrice)

With rstemp
.Fields("price") = pPrice
.Fields("listPrice") = pListPrice
.Fields("bToBPrice") = pClubPrice
.Fields("cost") = pCostPrice
End With

counter = counter + 1


Please tell me if there is a way around this ? Is this a mySQL problem?? What do you suggest PLEASE??

Thanks ~ Jonathan