Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 resetting auto-increase values
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 14 December 2004 :  14:58:04  Show Profile  Visit MarcelG's Homepage
I have implemented a couple of sites based on my current oxle code, and I run in to the simple problem that even though I empty the DB (existing db with all apropriate tables etc), the autoincrease values are still saved.
So, for instance ; I use the db of oxle of today. The last member_id is 341, the last topic_id is 2241 etc.
Now I start a new forum, with no members except for admin, and no topics, and only 1 forum.
The first topic I start as admin is topic 2242...the first member that registers is member 342...the first forum I create is forum 94....
Where can I reset those values, so they start over?

portfolio - linkshrinker - oxle - twitter

-gary
Development Team Member

406 Posts

Posted - 14 December 2004 :  15:18:42  Show Profile
If you're using Access, then you have to do a "compact and repair".

KawiForums.com


Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 14 December 2004 :  15:39:02  Show Profile  Visit MarcelG's Homepage
mmm..I've done that already...
since deleting the topics from the db didn't make it any smaller, and I didn't want to upload a 15 Mb empty db, I did that already...but unfortunately it didn't seem to work...

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 December 2004 :  15:42:34  Show Profile  Send ruirib a Yahoo! Message
You mean you deleted the topics and replies, compacted the DB and the size didn't go down and the autonumbers were not reset to their lowest value?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 14 December 2004 :  15:55:30  Show Profile  Visit MarcelG's Homepage
the size did go down...but the autoreset values didn't...
I used Access 2003 for this operation (on an initially Access 2000 created DB)

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

-gary
Development Team Member

406 Posts

Posted - 14 December 2004 :  16:15:27  Show Profile
BUG: AutoNumber field is not reset after you compact an Access database

KawiForums.com


Go to Top of Page

Jorrit787
Average Member

Netherlands
681 Posts

Posted - 14 December 2004 :  16:22:59  Show Profile  Visit Jorrit787's Homepage  Send Jorrit787 an AOL message  Send Jorrit787 a Yahoo! Message
Just curious: Why would you want to reset them for a new forum?

eXtremeGossip
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 14 December 2004 :  16:48:05  Show Profile  Visit MarcelG's Homepage
-gary ; thanks! Will try the provided workaround as soon as possible!
Jorrit ; because it would be ridiculous to have the first topic in a completely empty forum to be topic number 3178...or the first member to be member number 188.
I know it doesn't make any real difference, but it isn't logical.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 December 2004 :  17:27:49  Show Profile  Send ruirib a Yahoo! Message
You can run an ALTER TABLE query, in SQL View mode, for each table where you have the problem. The syntax is this:

ALTER TABLE FORUM_REPLY ALTER COLUMN REPLY_ID COUNTER (1, 1)

Just change the code to adapt to the table/Column, paste it to a new query in SQL view mode, execute the query and you're done, for that table.
The blue value is the new value for the autoincrement column.


Snitz 3.4 Readme | Like the support? Support Snitz too

Edited by - ruirib on 14 December 2004 17:29:34
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 14 December 2004 :  17:29:38  Show Profile  Visit MarcelG's Homepage
Thanks for the help guys!!!

portfolio - linkshrinker - oxle - twitter
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07