#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    1
    Rep Power
    0

    Check for existing DB entry


    I am using FP 2003 with an Access DB, and I am looking for some assistance with checking for an exisiting value in the DB at the time of submitting the data to be certain a duplicate is not getting entered.

    Any assistance would be greatly appreciated.

    Thanks
    David
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,424
    Rep Power
    4539
    There are a couple approaches you can take. I usually just query the db for the record in question, look at the resulting recordset and see if it's empty or not, if empty proceed with the insert else provide a message about the record already existing.

    Within the DB you can put a unique index on the record, and your code can just do the insert and check for an error or not returned by the db.
    ======
    Doug G
    ======
    The man who doesn't read good books has no advantage over the man who can't read them.
    --Mark Twain
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    1
    Rep Power
    0

    delete duplicate querry


    HI


    Deleting duplicate qurerry in your db is okay...but i have no idea how to use FP and instuct you that you have entered the same

    To find a solution for this quite difficult

    Thanks & Regards
    web development company
    Prodigy Apex technologies

    Comments on this post

    • Ronster disagrees : Not the right way to handle this. You don't "delete" the existing record, you tell the user that the record already exists.

IMN logo majestic logo threadwatch logo seochat tools logo