Results 1 to 6 of 6

Thread: Swapping records

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    37
    I'm looking for a good way to swap to records within a recordset. When I've tried the traditional way of swapping I get an access violation error becuase of duplicate primary keys.


  2. #2

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    37
    Just the traditional swap algorithm

    this would swap var1 with var 2

    temp = var1
    var1 = var2
    var2 = temp

    I just used this concept exept used loops to copy all the fields into temp arrays. The problem is, there is a stage where var1 and var2 are equal, the database doesn't like this since the primary keys are the same.

  4. #4

  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    37
    I would need to delete both records before I could write any data, so if I added new records wouldn't they just be at the end of the recordset?

  6. #6

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