Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Updating up to version 8.0 bug
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Updating up to version 8.0 bug

 Post Reply Post Reply
Author
Ritchie View Drop Down
Groupie
Groupie
Avatar

Joined: 14 June 2005
Location: Russian Federation
Status: Offline
Points: 91
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ritchie Quote  Post ReplyReply Direct Link To This Post Topic: Updating up to version 8.0 bug
    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
 
Чем дальше в лес, тем толще партизаны
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Ritchie View Drop Down
Groupie
Groupie
Avatar

Joined: 14 June 2005
Location: Russian Federation
Status: Offline
Points: 91
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ritchie Quote  Post ReplyReply Direct Link To This Post 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!
 
 
 
 
 
 


Edited by Ritchie - 22 March 2006 at 8:12am
Чем дальше в лес, тем толще партизаны
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2006 at 11:17am
I have updated the upgrade tool with the corrections to it to hopefully fix this problem.
Back to Top
Ritchie View Drop Down
Groupie
Groupie
Avatar

Joined: 14 June 2005
Location: Russian Federation
Status: Offline
Points: 91
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ritchie Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2006 at 7:00pm

Many thanks! All works!Thumbs Up

Чем дальше в лес, тем толще партизаны
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 23 March 2006 at 10:45am
Cool, thanks for letting me know
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.