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")
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")&"-")