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)
 Archiving Malfunction?
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

KOR
Starting Member

17 Posts

Posted - 12 November 2006 :  20:20:23  Show Profile
Greetings,

I am trying to archive my forums as they have been running slow lately. I access the admin function to archive all topics in my forums. I can select all of the boxes next to each forum I want to archive, get to the drop-down list of how far back I want to archive and press archive.

When I go to look back at my forums after the archiving is "complete" (I don't know if it's doing anything at all, really) there is no folder with the "A" on it indicating that there are even archived topics within the forum.

Am I missing a step, or doing something wrong here? I am completely new to this process (read that as Snitz and ASP). Any ideas?

Additionally, I get this information when it "completes":

.INSERT INTO FORUM_A_REPLY (CAT_ID, FORUM_ID, TOPIC_ID, REPLY_ID, R_AUTHOR, R_MESSAGE, R_DATE, R_IP, R_STATUS, R_LAST_EDIT, R_LAST_EDITBY, R_SIG) VALUES (1, 3, 5518, 89780, 79, '

Followed by about half a page of quoted material and then:

', '20060228231907', '207.115.227.221', 1, '', NULL, 0 )


Edited by - KOR on 12 November 2006 20:24:23

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 12 November 2006 :  21:18:21  Show Profile  Send ruirib a Yahoo! Message
Seems like that someone messed with the code for admin_forums.asp in your forum.


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

KOR
Starting Member

17 Posts

Posted - 12 November 2006 :  22:03:31  Show Profile
quote:
Originally posted by ruirib

Seems like that someone messed with the code for admin_forums.asp in your forum.



I am the only one who has access to the coding. I have added a few mods here and there including simple paging mod, ASPChatNow (with the KC addon), and the ignore post mod. Those are the only three that would have called to modify the admin_forums.asp I think.

*Edit: I can't seem to find any reference in any of them pointing to "admin_forums.asp" but I can find a reference to "forum.asp" in dealing with the simple paging mod.

Edited by - KOR on 12 November 2006 22:13:31
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 November 2006 :  05:48:08  Show Profile  Send ruirib a Yahoo! Message
What version are you using?


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

KOR
Starting Member

17 Posts

Posted - 13 November 2006 :  12:10:02  Show Profile
quote:
Originally posted by ruirib

What version are you using?



3.4.05
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 November 2006 :  13:13:09  Show Profile  Send ruirib a Yahoo! Message
I would then suggest that you get an unchanged admin_forums.asp from your Snitz download (for 3.4.05) and use it instead of the one you now have. Make sure to keep a backup of your current file.


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

KOR
Starting Member

17 Posts

Posted - 13 November 2006 :  18:02:15  Show Profile
quote:
Originally posted by ruirib

I would then suggest that you get an unchanged admin_forums.asp from your Snitz download (for 3.4.05) and use it instead of the one you now have. Make sure to keep a backup of your current file.



I will give that a go and report the progress...thanks for the help thus far!
Go to Top of Page

KOR
Starting Member

17 Posts

Posted - 13 November 2006 :  18:37:31  Show Profile
Now for the fun stuff!

I took your suggestion and replaced an original admin_forums.asp with my current one. I tried to archive a forum and it gave me a thumbs up all the way until the end where it gave me an error:

Microsoft VBScript runtime error '800a000d'

Type mismatch

/forum/admin_forums.asp, line 805


My line 805 is as follows:

intF_COUNT = 0

On the forum that was "archived" it actually deleted all of the posts! I chose this forum because there was a load of garbage in it really, so it was a test. I tried on a second forum and get this error:

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

[MySQL][ODBC 3.51 Driver][mysqld-5.0.21-community-max-nt]Duplicate entry '1-10-63-855' for key 1

/forum/admin_forums.asp, line 489



My line 489 is as follows:

my_conn.execute(strsql),,adCmdText + adExecuteNoRecords

Any ideas?

Edited by - KOR on 13 November 2006 18:45:49
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 November 2006 :  19:54:14  Show Profile  Send ruirib a Yahoo! Message
My guess is that the archiving did went well in the first case, it just didn't complete the count updating due to a bug in MySQL 5.x. that causes the errors that made it stop the first time. Updating counts using the SQL I posted sometime ago would surely make the archived posts appear:
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=61685

The 2nd error suggests that the replies already exist in the archived replies table, probably from a failed previous archiving attempt. The way to handle it would be to use SQL again, to find out which posts are duplicated and delete them...


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

KOR
Starting Member

17 Posts

Posted - 13 November 2006 :  22:35:53  Show Profile
quote:
Originally posted by ruirib

My guess is that the archiving did went well in the first case, it just didn't complete the count updating due to a bug in MySQL 5.x. that causes the errors that made it stop the first time. Updating counts using the SQL I posted sometime ago would surely make the archived posts appear:
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=61685

The 2nd error suggests that the replies already exist in the archived replies table, probably from a failed previous archicing attempt. The way to handle it would be to use SQL again, to find out which posts are duplicated and delete them...



Good call on the code. That seemed to help a bit. Now, the archive (folder with the "A") shows up on some of the forums I tried to archive. The others are still shooting me the duplicate entry jive. While I don't want a held-hand tutorial, I am a complete beginner at this. In reference to the 2nd error, how do I find out which posts are duplicated and how to delete them?

I took your recommendation from other thread and got SQLyog and can logon to my db but am not confident enough to start messing with it. Where to go from here?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 14 November 2006 :  04:05:42  Show Profile  Visit HuwR's Homepage
to determine whether you have duplicate topics or replies, run the following queries

for topics
SELECT * FROM FORUM_A_TOPICS AT WHERE EXISTS(SELECT TOPIC_ID FROM FORUM_TOPICS T WHERE T.TOPIC_ID = AT.TOPIC_ID)
for replies
SELECT * FROM FORUM_A_REPLY AR WHERE EXISTS(SELECT REPLY_ID FROM FORUM_REPLY R WHERE R.REPLY_ID = AR.REPLY_ID)

when you have discovered which tables has the duplicates, I would strongly recomend making a back up of your database, then you can run the following queeries to remove the duplicate records.

topics
DELETE FROM FORUM_A_TOPICS AT WHERE EXISTS (SELECT TOPIC_ID FROM FORUM_TOPICS T WHERE T.TOPIC_ID = FT.TOPIC_ID)
replies
DELETE FROM FORUM_A_REPLY AR WHERE EXISTS (SELECT REPLY_ID FROM FORUM_REPLY R WHERE R.REPLY_ID = AR.REPLY_ID)
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 November 2006 :  05:55:10  Show Profile  Send ruirib a Yahoo! Message
You should also be aware that the error you got while archiving will always occur with MySQL 5.0. The only way around would be to rewrite the archiving code and get the code to update counts that I posted earlier, add it as a stored procedure and call it from the rewritten archiving code... I know this may be a hard thing for you to do...

I don't recommend the use of MySQL 5.0 with ASP apps that need to perform counting ops using SQL.


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

KOR
Starting Member

17 Posts

Posted - 14 November 2006 :  07:29:42  Show Profile
ruirib,

Thanks for the heads up. This is slowly starting to come together. I am taking all of the answers that I am getting and combining it with reading as much as I can about MySQL and Snitz so hopefully I can become a bit less dependent on others to run my forums! While it's all new, I think that as more errors occur, the more I will learn. I will let you know how this fairs!
Go to Top of Page

KOR
Starting Member

17 Posts

Posted - 14 November 2006 :  17:45:12  Show Profile
ruirib,

I am able to execute the query pointing to duplicate replies. When I try and execute the second, to delete them, I get the following error:

Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE EXISTS (SELECT REPLY_ID FROM FORUM_REPLY R WHERE R.REPLY_ID = AR.REPLY_ID)' at line 1
(16 ms taken)


Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 14 November 2006 :  19:18:52  Show Profile  Send ruirib a Yahoo! Message
My MySQL doesn't like that syntax either (never liked the subquery support in MySQL, Huw ).
Try this instead:

DELETE AT FROM FORUM_TOPICS T INNER JOIN FORUM_A_TOPICS AT ON T.TOPIC_ID=AT.TOPIC_ID;

DELETE AR FROM FORUM_REPLY R INNER JOIN FORUM_A_REPLY AR On R.REPLY_ID=AR.REPLY_ID;


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

KOR
Starting Member

17 Posts

Posted - 14 November 2006 :  22:18:28  Show Profile
The query worked to delete duplicates! Now, when I try to archive (with the older admin_forums.asp) I get this error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

Query-based delete failed because the row to delete could not be found.

/forum/admin_forums.asp, line 503


Hmmm...
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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.58 seconds. Powered By: Snitz Forums 2000 Version 3.4.07