Results 1 to 4 of 4

Thread: Clear table in database

  1. #1

    Thread Starter
    Hyperactive Member Stiletto's Avatar
    Join Date
    Aug 2002
    Location
    Jerusalem, Israel
    Posts
    287

    Clear table in database

    1.How Can I clear a whole table in a database from all of its Records (Values only)?
    2. My first field is an Auto Num. I made some tests, and now when i add a record to the table, even when the table is empty, the auto num starts from 13 (I made 13 tests, inserting and deleting records...).
    If I delete it i wont see it in the Table, but the auto numo f the next record will be 14.
    How can i reset the auto num?
    tnx

  2. #2
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    autonums are a special field and the only way to restart them is to unlink them from anything they are linked to, and then delete the field, and then reinstall the field. you can't just clear the autonum of data and expect it to restart at 1, because it is SPECIFICALLY designed not to do that.

  3. #3

    Thread Starter
    Hyperactive Member Stiletto's Avatar
    Join Date
    Aug 2002
    Location
    Jerusalem, Israel
    Posts
    287
    k right,
    So after my program is finish, how can i restart/unlink the auto num so the database will be empty as new?

  4. #4
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    You could keep a template on-hand whch would always have the "proper" indexing required. When app exits delete database (if data really not needed), and replace with template database....

    Just an idea...
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

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