Crazy Update Statement

Results 1 to 2 of 2

Thread: Crazy Update Statement

  1. #1
    Join Date
    Dec 1969

    Default Crazy Update Statement

    Is something wrong with my UPDATE statement? If I use qty =&#039;"&request.form("myRepeater:ctrl" & trim(str(x)) & ":qty")&"&#039; 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=&#039;3&#039; 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 =&#039;"&request.form("myRepeater:ctrl" & trim(str(x)) & ":qty")&"&#039; WHERE proddesc=&#039;pipe&#039;", myConnection)

  2. #2
    Join Date
    Dec 1969

    Default As with classic ASP...

    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&#039;d suspect, will help you greatly in diagnosing your problem. If you&#039;re still having fits, cut and paste the SQL statement here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts