Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006
    Posts
    19

    Unanswered: Insert or Update (on insert error)

    Is there some sort of query possible in MS Access to insert a row but if it violates the contraints that if will update the row then with these constraints. I know other db systems have this option but I can't get something like that working in MS Access.

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    This is informally known as an UPSERT (try googling), although the ISO SQL syntax uses the MERGE keyword.
    In short, no - you have to code it up yourself using VBA. You can't perform this solely in Access SQL. Personally, I would code it to avoid getting an error since error handling has some overhead.
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

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