Results 1 to 3 of 3

Thread: Append records

  1. #1

    Thread Starter
    Addicted Member smh's Avatar
    Join Date
    Oct 2000
    Location
    South Dakota, USA
    Posts
    249

    Try this...

    Try looking at the code here:

    http://www.vb-world.net/articles/database3/index4.html

    It is code to create a new database, but it will give you an idea of how to go about what you need to do. There's a good example of the 'append' with DAO.

    smh

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008

    Add New not Append

    Append and AddNew or not similar methods - Append is to add an object to a collection (e.g. fields to a table definition) and AddNew is to add records.

    You definitely want AddNew - it will only error if the record already exists with the same key. In this case you would not want to add the record and you should apply some error handling.

    If the table is not keyed, then the record will be added without error.

    Cheers,

    Paul.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  3. #3
    Lively Member
    Join Date
    Sep 2000
    Location
    Singapore
    Posts
    78
    What is the error that prompts you? Is it something regarding duplicate values/key values?

    If so you're trying to add something that's already been added to the database. Either you change the Unique key value in the database or filter out the duplicate records.

    Setting up a error handler in this case will be very useful like wat paulw has suggested

Posting Permissions

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



Click Here to Expand Forum to Full Width