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: General / Classic ASP versions(v3.4.XX)
 Duplicate Entry When Archiving
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

trevally
Starting Member

46 Posts

Posted - 23 September 2006 :  06:42:12  Show Profile  Visit trevally's Homepage
Thanks to the wonderful advice here, I have successfully migrated my forum to MySQL and it has been running smoothly for several months. Another thing crept up when I archived, I faced the following duplicate entry error:

Administrative Forum Archive Functions
Archive all topics:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

Duplicate entry '237846' for key 1

/forum/admin_forums.asp, line 489


When I searched through the support forum, I found another member whose advice is to look for an empty field and delete it. That's gonna be a tedious task for me.

Is this an index issue?

Thanks,
Vincent

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 23 September 2006 :  07:20:27  Show Profile  Send ruirib a Yahoo! Message
It may not be an index thing, you may simply have a duplicate entry from a previous failed archiving attempt. You can try and find entries in FORUM_A_TOPICS that also exist in FORUM_TOPICS or in FORUM_REPLY and FORUM_A_REPLY and delete the duplicate ones in the _A_ tables.


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

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 23 September 2006 :  07:38:08  Show Profile  Visit HuwR's Homepage
If you need help writing the query then please ask as I'm sure we can help
Go to Top of Page

trevally
Starting Member

46 Posts

Posted - 23 September 2006 :  08:51:43  Show Profile  Visit trevally's Homepage
Can I ask you guys something:

Is "A" in FORUM_A_TOPICS means Archive?

Geez, it's gonna be an red eye exercise to compare thousands of topics. Is there any SQL command which is available to automate such process?

Tiger beer on me when you guys are in Malaysia the next time. Promise!

Regards,
Vincent
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 23 September 2006 :  09:11:50  Show Profile  Visit HuwR's Homepage
yes to both questions.

you need to basically write a query that says something like this (not sure if it will work in MySQL)

SELECT * FROM FORUM_A_TOPICS FA WHERE FA.TOPIC_ID IN (SELECT TOPIC_ID FROM FORUM_TOPICS)

that should list all the topics that exist in both tables
Go to Top of Page

trevally
Starting Member

46 Posts

Posted - 23 September 2006 :  09:27:10  Show Profile  Visit trevally's Homepage
HuwR,

I'll try now...

Vincent
Go to Top of Page

trevally
Starting Member

46 Posts

Posted - 23 September 2006 :  09:39:18  Show Profile  Visit trevally's Homepage
I got this result:

MySQL returned an empty result set (i.e. zero rows). (Query took 0.0059 sec)
SQL query: SELECT *
FROM FORUM_A_TOPICS FA
WHERE FA.TOPIC_ID
IN (

SELECT TOPIC_ID
FROM FORUM_TOPICS
)
LIMIT 0 , 30

Am I doing this correctly?

Regards,
Vincent
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 23 September 2006 :  15:30:47  Show Profile  Visit HuwR's Homepage
it could be a duplicate in the replies tables, so try this

SELECT * FROM FORUM_A_REPLY FR WHERE FR.REPLY_ID IN (SELECT REPLY_ID FROM FORUM_REPLY)
Go to Top of Page

trevally
Starting Member

46 Posts

Posted - 24 September 2006 :  10:18:22  Show Profile  Visit trevally's Homepage
Yes! I got some results! 8,230 in total. Are these the records I should delete? Are these from the archive table?

Hope the screen capture below is what the result should be from the SQL query string.



Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 24 September 2006 :  14:15:41  Show Profile  Visit HuwR's Homepage
Ok, now we are getting somewhere. these are replies in the archived table which also appear in your non-archived tables, hence the reason you are now getting the duplicate errors, yes you should either remove them or remove the ones in the non-archived table, however if you are unsure or a bit wary, may I suggest doing a backup dump of your database before you proceed any further.

Go to Top of Page

trevally
Starting Member

46 Posts

Posted - 06 October 2006 :  20:52:39  Show Profile  Visit trevally's Homepage
HuwR,

I am gonna take a raincheck on this but if I really proceed with this, that means I should:

1. Stop the board into Maintenance Mode
2. Enter my MySQL via PHPmyAdmin
3. Do an export of FORUM_REPLY for backup
4. Then run the "SELECT * FROM FORUM_A_REPLY FR WHERE FR.REPLY_ID IN (SELECT REPLY_ID FROM FORUM_REPLY" script
5. Let the result be displayed as above
6. Delete all the shown results
7. Reactivate back board

Am I correct for the steps?

Vincent
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 06 October 2006 :  21:23:58  Show Profile  Visit AnonJr's Homepage
I think you forgot the "Make backup first and foremost just in case" at the very beginning.
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.97 seconds. Powered By: Snitz Forums 2000 Version 3.4.07