Crazy Update Statement

Asselpexags

New Member
Is something wrong with my UPDATE statement? If I use qty ='"&request.form("myRepeater:ctrl" & trim(str(x)) & ":qty")&"' in an INSERT statment, the data is inserted into a new row. But for some reason the UPDATE is not working. If I say qty='3' then it works. <BR><BR>Of course I have dimmed x as interger and use the x=1 and x +=1 in my for each statement. AS I say, it does work in an INSERT. Why not in the UPDATE? <BR><BR><BR><BR>myCommand = NEW SQLCommand("Update ORDERS SET qty ='"&request.form("myRepeater:ctrl" & trim(str(x)) & ":qty")&"' WHERE proddesc='pipe'", myConnection)When using dynamic SQL statements and getting errors, put your dyanmic SQL statment in a variable and have it printed out right BEFORE you make the call. This, I'd suspect, will help you greatly in diagnosing your problem. If you're still having fits, cut and paste the SQL statement here.
 
Back
Top