Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I Reset Next AutoIncrement Value to 0

Status
Not open for further replies.

Mickbw

Programmer
Jul 9, 2001
84
US
Good Afternoon,

I have a free table used to store Daily Transactions until the Day's activity is finalized when they are appended to a Table which stores the history.

I have an autoincrementing integer field on this Transaction table that I would like to reset to 0 when the day is finalized and the table is zapped.

Is there a way to do this short on dropping the column and readding it.

Any assistance would be greatly appreciated.

Sincerely,

Michael Brennan-White

 
HI
I believe you must be talking about VFP8 now. If yes, I would suggest you to delete the file from the DBC by REMOVE TABLE command and then again create a new file using CREATE TABLE by code for the next day.

In VFP8 the table header is having the autoincrement related values. So another alternatice is to save the first blank created file with a different name and then everyday copy this file over and above the existing days transaction file.

If you are talking about VFP7 or earlier, nothing stops you from reinitialising the code to whatever you want.

:)

ramani :)
(Subramanian.G)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top