Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Corrupt Database

Discussion in 'Information Technology' started by Dave, Jul 28, 2006.

  1. Dave

    Dave
    Expand Collapse
    Guest

    I have a corrupt table with some 130,000 rows and have followed the advice
    below - ie created a copy of the table and imported the records (other than
    the bad ones)

    My question now is how to handle the AutoNumber field - if I import the data
    with the field set as autonumber I obviously get the wrong numbers where
    there are rows that have been deleted.

    Thanks

    Dave


    "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
    news:<uRkxRXDcGHA.3856@TK2MSFTNGP03.phx.gbl>...

    > Create a copy of the table, and import all the other records, without


    > referring to the bad one.


    > Details in the 3rd symptom of this article:


    > Recovering from corruption


    > at:


    > http://allenbrowne.com/ser-47.html


    > Allen Browne - Microsoft MVP. Perth, Western Australia.






    > > When I try to compact and repair an Access database I get an error

    message.

    > > Access has encountered a problem etc etc


    > > The problem is due to one record in a table. If I delete the table it


    > > compacts correctly.


    > > Interestingly if I scroll through the table when I get to that record,

    Access exits.

    > > I had the same problem last week and simply deleting the record solved

    the probllem

    > > The problem this time is that I cannot delete the record - I get an

    error

    > > message saying Insufficient System resources.


    > > I have also tried to delete the record using code and get a runtime

    error and it also exits

    > > Any suggestions gratefully received


    > > Thanks


    > > Dave
     
  2. Loading...

    Similar Threads Forum Date
    Politics Power Corrupts but It Also Plays with Your Mind Breaking News Sep 22, 2013
    India Corruption rate in India is double of global average Breaking News Jul 9, 2013
    Partition Corruption in the Punjab... History of Sikhism Mar 24, 2013
    Bant Singh - A real anti-corruption hero Inspirational Stories Feb 27, 2013
    India US report slams India on corruption, social violence Breaking News May 25, 2012

  3. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Thu, 11 May 2006 13:06:36 +1200, "Dave"
    <strategicdelivery@ihug.co.nz> wrote:

    >My question now is how to handle the AutoNumber field - if I import the data
    >with the field set as autonumber I obviously get the wrong numbers where
    >there are rows that have been deleted.


    Not necessarily. If you use an Append query, and append ALL of the
    fields including the autonumber, then the value in the original table
    will be faithfully reflected in the new one.

    Of course there will be gaps (where you didn't import a record) - but
    that's what you WANT. If you expect autonumbers to be gapless and
    sequential, your expectation is WRONG.

    John W. Vinson[MVP]
     
  4. Joseph Meehan

    Joseph Meehan
    Expand Collapse
    Guest

    Dave wrote:
    >I have a corrupt table with some 130,000 rows and have followed the
    > advice below - ie created a copy of the table and imported the
    > records (other than the bad ones)
    >
    > My question now is how to handle the AutoNumber field - if I import
    > the data with the field set as autonumber I obviously get the wrong
    > numbers where there are rows that have been deleted.
    >
    > Thanks
    >
    > Dave
    >


    Let me add my opinion that using autonumber where someone will see the
    numbers and especially when you want to put some significant meaning to the
    numbers is wrong. Autonumbers are designed to create unique numbers only
    and should never be counted on to provide sequential numbers.


    --
    Joseph Meehan

    Dia duit
     
  5. Dave

    Dave
    Expand Collapse
    Guest

    Thanks Joseph

    Yes I agree - but unfortunately this is a database that I have inherited
    from another developer

    Dave
    "Joseph Meehan" <sligojoe_Spamno@hotmail.com> wrote in message
    news:pZE8g.31682$mh.5124@tornado.ohiordc.rr.com...
    > Dave wrote:
    > >I have a corrupt table with some 130,000 rows and have followed the
    > > advice below - ie created a copy of the table and imported the
    > > records (other than the bad ones)
    > >
    > > My question now is how to handle the AutoNumber field - if I import
    > > the data with the field set as autonumber I obviously get the wrong
    > > numbers where there are rows that have been deleted.
    > >
    > > Thanks
    > >
    > > Dave
    > >

    >
    > Let me add my opinion that using autonumber where someone will see the
    > numbers and especially when you want to put some significant meaning to

    the
    > numbers is wrong. Autonumbers are designed to create unique numbers only
    > and should never be counted on to provide sequential numbers.
    >
    >
    > --
    > Joseph Meehan
    >
    > Dia duit
    >
    >
     
  6. Dave

    Dave
    Expand Collapse
    Guest

    Hi John

    Thanks for your reply - are you suggesting the data to the new table with
    the field that is the ID set to an Autonumber or to a Long Integer?

    Dave

    "John Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message
    news:gik562l7b8cn1uuq1lbadf27qoos76nnd7@4ax.com...
    > On Thu, 11 May 2006 13:06:36 +1200, "Dave"
    > <strategicdelivery@ihug.co.nz> wrote:
    >
    > >My question now is how to handle the AutoNumber field - if I import the

    data
    > >with the field set as autonumber I obviously get the wrong numbers where
    > >there are rows that have been deleted.

    >
    > Not necessarily. If you use an Append query, and append ALL of the
    > fields including the autonumber, then the value in the original table
    > will be faithfully reflected in the new one.
    >
    > Of course there will be gaps (where you didn't import a record) - but
    > that's what you WANT. If you expect autonumbers to be gapless and
    > sequential, your expectation is WRONG.
    >
    > John W. Vinson[MVP]
     
  7. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Fri, 12 May 2006 10:19:50 +1200, "Dave"
    <strategicdelivery@ihug.co.nz> wrote:

    >Hi John
    >
    >Thanks for your reply - are you suggesting the data to the new table with
    >the field that is the ID set to an Autonumber or to a Long Integer?
    >
    >Dave


    Whichever you prefer as the eventual datatype of the ID. Both will
    work.

    John W. Vinson[MVP]
     

Share This Page