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)
 Alternate Update Forum Counts?
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Lon2
Junior Member

USA
151 Posts

Posted - 03 March 2009 :  14:10:21  Show Profile
Do you know a way to update forum counts via TSQL or SQL Server Management Studio/Express?

Our forums are large and take a long time to go through the process that is available in Admin Options.

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 03 March 2009 :  16:02:30  Show Profile  Visit HuwR's Homepage
http://forum.snitz.com/forum/topic.asp?whichpage=2&TOPIC_ID=67666&SearchTerms=update%20forum%20counts%20#384596

somewhere near the end of the post I think
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 03 March 2009 :  16:13:49  Show Profile  Send ruirib a Yahoo! Message
Probably the one here is more up to date (small bug ironed out, I think): http://forum.snitz.com/forum/topic.asp?TOPIC_ID=61686&SearchTerms=update,counts


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

Lon2
Junior Member

USA
151 Posts

Posted - 03 March 2009 :  17:34:14  Show Profile
Thanks guys, that's exactly what I was looking for! I have a question and I hope you don't mind if I ask it here. All my tables have a prefix on them, like clientX_dbname.TABLE_NAME, because of being with a host. Will I need to modify all of the table names in the T-script?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 03 March 2009 :  17:41:46  Show Profile  Visit HuwR's Homepage
no you shouldn't need to if your database is set up correctly and you are logged in as that user it should be fine.
Go to Top of Page

Lon2
Junior Member

USA
151 Posts

Posted - 03 March 2009 :  18:08:05  Show Profile
Does the forum need to be stopped before I run the T-SQL?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 03 March 2009 :  18:35:51  Show Profile  Send ruirib a Yahoo! Message
No, it shouldn't be needed.


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

Lon2
Junior Member

USA
151 Posts

Posted - 03 March 2009 :  18:53:31  Show Profile
HELLP! I may have just lost everything!

Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'mydb'. No entry found with that name. Make sure that the name is entered correctly.

(43 row(s) affected)
Msg 208, Level 16, State 0, Line 4
Invalid object name '#F_T_COUNT'.
Msg 3701, Level 11, State 5, Line 2
Cannot drop the table '#F_T_COUNT', because it does not exist or you do not have permission.

Edited by - Lon2 on 03 March 2009 19:32:41
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 03 March 2009 :  19:02:11  Show Profile  Send ruirib a Yahoo! Message
You can't have lost everything. Something is wrong with your server. That script ran in several PCs and is even part of the .net version, so it was tested and passed those tests.

The output also shows a lot of ops being completed... what is the current status?


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

Lon2
Junior Member

USA
151 Posts

Posted - 03 March 2009 :  19:04:51  Show Profile
Every single individual forum (~60) now shows zero topics!

Edited by - Lon2 on 03 March 2009 19:06:31
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 03 March 2009 :  19:08:12  Show Profile  Send ruirib a Yahoo! Message
It hasn't, the topics are there, it's just the count that is wrong (only the count is changed, no topics and replies are touched).

Try running the script again.


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

Lon2
Junior Member

USA
151 Posts

Posted - 03 March 2009 :  19:10:04  Show Profile
It still shows replies but every indiv forum shows zero topics. Would it be better to run the Update Forum Counts from Admin Options at this point?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 03 March 2009 :  19:10:36  Show Profile  Send ruirib a Yahoo! Message
Did you run the script again?


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

Lon2
Junior Member

USA
151 Posts

Posted - 03 March 2009 :  19:11:32  Show Profile
No. I'm afraid to...
Go to Top of Page

Lon2
Junior Member

USA
151 Posts

Posted - 03 March 2009 :  19:15:24  Show Profile
I have never been able to run an UPDATE command without CONVERT(nvarchar(max). Could this be the problem with running the T-SQL?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 03 March 2009 :  19:16:09  Show Profile  Send ruirib a Yahoo! Message
Run the script again. There was an error when you ran it the first time.

I assure you the script just deals with the counts and the error message shows it failed when counting topics per forum (I can tell that from the name of the temporary table in the error message). The info is all there.

Run it again and let me know. If it fails, email me through the forum and I will email you a stored proc to do that and you can run it. You may have commited some error while copying the script code.

This code works. Even about a week ago I sent the code to SiSL and he used it on his own SQL Server based forum.


Snitz 3.4 Readme | Like the support? Support Snitz too
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.44 seconds. Powered By: Snitz Forums 2000 Version 3.4.07