How do I reset the counter in an on-line database??

T

Tomas

I am more or less done with my design of a web where one page is a user
questionnaire. This form was designed in FP and is coupled to an Access
database. When testing the form I wrote some dummy entries to it while at the
same time some real users entered their data too.

So, I downloaded the database deleted my dummy entries and renumbered the
entries from 1 and up so there were no gaps where I had done my testing.

The form still works, but the counter keeps on numbering the entries as if
all entries were still there.

Where is this counter located and how can I reset it or set it to a desired
number?

Best,

Tomas
 
R

Ronx

From FrontPage, Export the database to your desktop.
Open the (exported) database in Access, then Tools->Compact and Repair
Database.
In FrontPage, Import the compacted database, replacing the current copy.

The record counter is stored in a system table (not accessible to users) in
the database.
 
S

Stefan B Rusynko

Compacting does not reset any autonumbers
(if that is what he is referring to)
The only way to reset autonumber fields in Access is to either
- delete the autonumber field, and all records, compact the DB and recreate the field
- make a copy of the table - structure only if you want it empty
(then delete the original table and rename the copy to the original table name)




| From FrontPage, Export the database to your desktop.
| Open the (exported) database in Access, then Tools->Compact and Repair
| Database.
| In FrontPage, Import the compacted database, replacing the current copy.
|
| The record counter is stored in a system table (not accessible to users) in
| the database.
|
| --
| Ron Symonds (Microsoft MVP - FrontPage)
| Reply only to group - emails will be deleted unread.
|
|
| | >I am more or less done with my design of a web where one page is a user
| > questionnaire. This form was designed in FP and is coupled to an Access
| > database. When testing the form I wrote some dummy entries to it while at
| > the
| > same time some real users entered their data too.
| >
| > So, I downloaded the database deleted my dummy entries and renumbered the
| > entries from 1 and up so there were no gaps where I had done my testing.
| >
| > The form still works, but the counter keeps on numbering the entries as if
| > all entries were still there.
| >
| > Where is this counter located and how can I reset it or set it to a
| > desired
| > number?
| >
| > Best,
| >
| > Tomas
|
|
 
R

Ronx

From Access help:

Compacting has no effect on autonumbering in an Access project. However, in
an Access database, if you have deleted records from the end of a table that
has an AutoNumber field, compacting the database resets the AutoNumber
value; the AutoNumber value of the next record you add will be one greater
than the AutoNumber value of the last undeleted record in the table.


In practice, if you empty the table and compact the database, the first
record entered will have autonumber 1. If you do not empty the table, the
counter may be reset as the help says, or not - seems quirky.
 
T

Tomas

Finally got it to work. Thanks!

This is how you do it:

1. Delete unnecessary records
2. Remove the counter field and save
3. Inser counter field with a new name and save
4. Rename to original name and save
5. Tools > compact and repair database
6. Upload

Best,

Tomas

"Ronx" skrev:
 
Top