SQL Update Problem

Results 1 to 2 of 2

Thread: SQL Update Problem

  1. #1
    Join Date
    Dec 1969

    Default SQL Update Problem

    HELP!!!<BR><BR>I added a new (bit) field to my SQL Server 2000 table, and added code to my ASP to accommodate it. (For your reference, the name of the field is "Completed.")<BR><BR>Before I added the new code, I had code that looked something like this (rs=recordset):<BR><BR>rs.update FieldArray1, DataArray1<BR>rs.update FieldArray2, DataArray2<BR>rs.update FieldArray3, DataArray3<BR><BR>This worked with NO PROBLEM.<BR><BR>Now, to accommodate my new "Completed" field, I added the following:<BR><BR>rs.update "Completed", DoneFlag<BR><BR>(where "DoneFlag" is either true or false).<BR><BR>But now, when I call the ASP, I get the following error message:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers (0x80004005)<BR>Query-based update failed because the row to update could not be found.<BR><BR>When I refresh the screen (without changing ANYTHING!), the screen I want appears, and the SQL gets updated with no problem.<BR><BR>The error message is VERY misleading, because the data does exist, and the select SQL finds it with no problem. I&#039;ve tried rephrasing the update command several different ways (even went as far as to make "Completed" and the data their own arrays), and I&#039;m still getting the same (identical) error.<BR><BR>Has anyone come across this? Does anyone have any insight into this problem?<BR><BR>Thanks in advance for your help . . .

  2. #2
    Join Date
    Dec 1969

    Default Your code makes no sense...

    You didn&#039;t even follow your own prior code pattern.<BR><BR> rs.update FieldArray1, DataArray1<BR><BR>Look at that: <BR> Field[hl="yellow"]Array[/hl]1<BR> Data[hl="yellow"]Array[/hl]1<BR><BR>But then you try to do:<BR><BR> rs.update "Completed", DoneFlag<BR><BR>I don&#039;t see any array used for either of those arguments.<BR><BR>ADODB.RecordSet.Update requires either zero arguments (in which case it is assume you have assigned the values to the fields already) or a *PAIR* of *ARRAYS*. <BR><BR><BR><BR>

Posting Permissions

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