Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2003
    Location
    Israel
    Posts
    10

    Unhappy Unanswered: an UPDATE command not updating all records

    hi all ,
    maybe you can help me - i'm having the strangest problem:
    i'm writing a simple query to update 2 fields in a table, and after i run
    the code, i see that all the records were updated - except for about 10 of them...they are no different then the other records.
    does anybody know this problem and how to fix it?

    thanks a lot
    miri

  2. #2
    Join Date
    Aug 2003
    Location
    Bangalore
    Posts
    15

    Re: an UPDATE command not updating all records

    remove the left and right spaces of field value.

    Originally posted by Miri
    hi all ,
    maybe you can help me - i'm having the strangest problem:
    i'm writing a simple query to update 2 fields in a table, and after i run
    the code, i see that all the records were updated - except for about 10 of them...they are no different then the other records.
    does anybody know this problem and how to fix it?

    thanks a lot
    miri

  3. #3
    Join Date
    Oct 2003
    Location
    Israel
    Posts
    10

    Re: an UPDATE command not updating all records

    thanks for your fast reply
    but there are no spaces anywhere in the field value - i checked...

  4. #4
    Join Date
    Oct 2003
    Location
    Israel
    Posts
    10

    Red face Re: an UPDATE command not updating all records

    me again...
    i think the problem is due to a lock violation -
    i'm working in "edited record", "dynaset" record status.
    any other status doesn't let me update any record at all -
    "no lock" gived me "write conflict" error that i can't get rid of...
    this was supposed to be very easy

  5. #5
    Join Date
    Aug 2003
    Location
    Bangalore
    Posts
    15

    Re: an UPDATE command not updating all records

    Take a copy of your table and try executing the query directly in the database and see it is working fine or not. So, it will be clear whether the problem is in data or in your code.

    I don't think any query will leave some records for updation. It should be problem with the data not matching the criteria.

    Originally posted by Miri
    me again...
    i think the problem is due to a lock violation -
    i'm working in "edited record", "dynaset" record status.
    any other status doesn't let me update any record at all -
    "no lock" gived me "write conflict" error that i can't get rid of...
    this was supposed to be very easy

  6. #6
    Join Date
    Oct 2003
    Location
    Israel
    Posts
    10

    Re: an UPDATE command not updating all records

    well, you're right, the problem is probebly in my code.
    i'm running a query that takes the value to be updated
    from a form text box.
    when i run this update query directly on the table or
    from my code, without using a parameter, the update is
    completed successfuly.
    i guess the problem is with the parameter retrieved from the
    text box...
    thank you so much for your help
    you're great !

    miri

  7. #7
    Join Date
    Aug 2003
    Posts
    42
    How did you fix it Miri? I am having the same problem! HELP!

  8. #8
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Perhaps the Trim() Functoin

  9. #9
    Join Date
    Aug 2003
    Posts
    42
    You have to set youre "Allow editions/deletions/additions" properties of the main form. I set the "allow editions" to "no" and that fixed it for me.

    Good Luck!

Posting Permissions

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