Print Page | Close Window

Updating up to version 8.0 bug

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=18825
Printed Date: 12 April 2026 at 8:57pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Updating up to version 8.0 bug
Posted By: Ritchie
Subject: Updating up to version 8.0 bug
Date Posted: 21 March 2006 at 1:43pm
Greetings, Borg! After updating a database of a forum from version 7.96 to version 8.0 has found out a mistake. The statistics of a forum is incorrectly displayed:
 
Was before updating:
 
Posts:188449
Topics: 15309
Forums: 19
 
 
 
Became after updating:
 
Posts:367013
Topics: 30144
Forums: 33
 


-------------
Чем дальше в лес, тем толще партизаны



Replies:
Posted By: WebWiz-Bruce
Date Posted: 21 March 2006 at 1:48pm
You have not mentioned what database version you are using?

Also, are the number of forums correct, a sit looks like you have picked up extra forums from somewhere.

Another trick is to try posting in some of the forums and see if that corrects the forum statistics.

Do you have a URL to this so that I can have a look?


Posted By: Ritchie
Date Posted: 22 March 2006 at 7:59am

I used version MSSQL 7.96. Tested on a local computer, therefore the link I can not give. A problem that the following code adds in the table tblPermission data who are duplicated.

   'Loop through each forum
   Do While intForumLoopCounter <= Ubound(iarryForumID,2)
   
    'Reset permissions loop counter
    lngPermissionsLoopCounter = 0
   
    'Loop through topics and to populate the topics table
    Do While lngPermissionsLoopCounter <= Ubound(iaryGroupID,2)
    
     'Get the gorup ID
    
     'See if a record exists for this group in the permissions table
     strSQL = "SELECT " & strDbTable & "Permissions.Group_ID " & _
     "FROM " & strDbTable & "Permissions " & _
     "WHERE " & strDbTable & "Permissions.Group_ID = " & CLng(iaryGroupID(0,lngPermissionsLoopCounter)) & " " & _
      "AND " & strDbTable & "Permissions.Group_ID = " & CLng(iarryForumID(0,intForumLoopCounter)) & ";"
     
     'Query the database
     rsCommon.Open strSQL, adoCon
     
     'If no record is returned insert a new record in the database
     If rsCommon.EOF Then
     
      blnRead = strDBTrue
      If CLng(iaryGroupID(0,lngPermissionsLoopCounter)) = 2 Then blnPost = strDBFalse Else blnPost = strDBTrue 'not guest
      If CLng(iaryGroupID(0,lngPermissionsLoopCounter)) = 2 Then blnReply = strDBFalse Else blnReply = strDBTrue 'not guest
      If CLng(iaryGroupID(0,lngPermissionsLoopCounter)) = 2 Then blnEdit = strDBFalse Else blnEdit = strDBTrue 'not guest
      If CLng(iaryGroupID(0,lngPermissionsLoopCounter)) = 2 Then blnDelete = strDBFalse Else blnDelete = strDBTrue 'not guest
      If CLng(iaryGroupID(0,lngPermissionsLoopCounter)) = 1 Then blnPriority = strDBTrue Else blnPriority = strDBFalse 'Admin only
      blnPollCreate = strDBFalse
      blnVote = strDBFalse
      blnAttachments = strDBFalse
      blnImageUpload = strDBFalse
      blnCheckFirst = strDBFalse
      blnEvents = strDBFalse
      blnModerator = strDBFalse
      
      'Insert values into database
      strSQL = "INSERT INTO [" & strDbTable & "Permissions] ( "
      strSQL = strSQL & "[Group_ID], "
      strSQL = strSQL & "[Forum_ID], "
      strSQL = strSQL & "[View_Forum], "
      strSQL = strSQL & "[Post], "
      strSQL = strSQL & "[Reply_posts], "
      strSQL = strSQL & "[Edit_posts], "
      strSQL = strSQL & "[Delete_posts], "
      strSQL = strSQL & "[Priority_posts], "
      strSQL = strSQL & "[Poll_create], "
      strSQL = strSQL & "[Vote], "
      strSQL = strSQL & "[Attachments], "
      strSQL = strSQL & "[Image_upload], "
      strSQL = strSQL & "[Moderate]"
      strSQL = strSQL & ") VALUES ("
      strSQL = strSQL & CLng(iaryGroupID(0,lngPermissionsLoopCounter)) & ", "   
      strSQL = strSQL & CLng(iarryForumID(0,intForumLoopCounter)) & ","
      strSQL = strSQL & blnRead & ","
      strSQL = strSQL & blnPost & ","
      strSQL = strSQL & blnReply & ","
      strSQL = strSQL & blnEdit & ","
      strSQL = strSQL & blnDelete & ","
      strSQL = strSQL & blnPriority & ","
      strSQL = strSQL & blnPollCreate & ","
      strSQL = strSQL & blnVote & ","
      strSQL = strSQL & blnAttachments & ","
      strSQL = strSQL & blnImageUpload & ","
      strSQL = strSQL & blnModerator & ")"
      
      'Write to the database
      adoCon.Execute(strSQL)
     End If
     
     'Close recordset
     rsCommon.Close
    
     'Move to next record
     lngPermissionsLoopCounter = lngPermissionsLoopCounter + 1
    Loop
    
    'Move to the next record
                   intForumLoopCounter = intForumLoopCounter + 1
   Loop
  End If 
 
 
Accordingly the inquiry in lines default.asp 138-144 files superfluous data.
 
 
 
 
The code in lines of a file msSQL_server_update.asp works incorrectly. After performance of updating the total of records tblPermission in my database became 749. Before their updating there was 584!
 
 
 
 
 
 


-------------
Чем дальше в лес, тем толще партизаны


Posted By: WebWiz-Bruce
Date Posted: 22 March 2006 at 11:14am
I see the problem, the SQL query in the beta upgrade tool should be:-

strSQL = "SELECT " & strDbTable & "Permissions.Group_ID " & _
     "FROM " & strDbTable & "Permissions " & _
     "WHERE " & strDbTable & "Permissions.Group_ID = " & CLng(iaryGroupID(0,lngPermissionsLoopCounter)) & " " & _
      "AND " & strDbTable & "Permissions.Forum_ID = " & CLng(iarryForumID(0,intForumLoopCounter)) & ";"

I'll make the corrections to the upgrade tool


Posted By: WebWiz-Bruce
Date Posted: 22 March 2006 at 11:17am
I have updated the upgrade tool with the corrections to it to hopefully fix this problem.


Posted By: Ritchie
Date Posted: 22 March 2006 at 7:00pm

Many thanks! All works!Thumbs Up



-------------
Чем дальше в лес, тем толще партизаны


Posted By: WebWiz-Bruce
Date Posted: 23 March 2006 at 10:45am
Cool, thanks for letting me know



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net