Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Location
    Oklahoma City, Oklahoma, USA
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Un-Splitting a Database (A2K)

    I have a database that is split. I want to change the attribute of two tables, the autonumber has been set to random and I want incremental. The database is empty in all fields and directly linkes fields that I need to make the change. It won't let me delete the relationship because the fields are linked and I cannot make any changes while the relationship exists. Am I missing something or do I need to recombine the data and the rest of the program.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Random to Increment Autonumber (A2K)

    That doesn't make sense, and what does it have to do with "un-splitting" a database? The relationships *are* what link the fields. You are working in the back end, right? None of this can be done from the front end with attached tables, and it doesn't require deleting relationships unless there's information you haven't mentioned.

    If the tables are empty, all you have to do is change the random autonumber field to a long and save the table. Then, since the tables are empty, you'll be able to change the long to an autonumber and set it to increment.

    If the tables previously held data, make sure you compact the backend before you try to change the autonumbers, just to make sure the seed is reset to 0.
    Charlotte

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Random to Increment Autonumber (A2K)

    I think changing a fieldtype to/from an autonumber does require the relationships to be deleted, even if no data.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Random to Increment Autonumber (A2K)

    Well, it didn't on my machine running A2K SR-1 on Win 2K SP2. I tested it before I posted. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Random to Increment Autonumber (A2K)

    >>Well, it didn't on my machine running A2K SR-1 on Win 2K SP2. I tested it before I posted. <<

    I tested with Access97 SR-2, and with referential integrity enforced between 2 tables, it wouldn't allow me to change the datatype of the field in the parent table, even from autonumber to long.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Random to Increment Autonumber (A2K)

    Oh, I see. We're talking about two different things. I was talking about the "many" side of the one-to-many relationship, where that table's autonumber is not involved in another relationship. It can be changed regardless.

    Yes, if the autonumber field in question is part of relationship, then you have to delete the relationship first. Sorry I wasn't clearer.
    Charlotte

Posting Permissions

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