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

  New Posts New Posts RSS Feed - Strange Error when posting message.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Strange Error when posting message.

 Post Reply Post Reply Page  12>
Author
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Topic: Strange Error when posting message.
    Posted: 16 April 2006 at 10:21am
hi, i get a strange error message when i try to reply to threads, posting the first post is fine, its just the replies:

Microsoft OLE DB Provider for SQL Server error '80040e14'

The query has been canceled because the estimated cost of this query (94) exceeds the configured threshold of 60. Contact the system administrator.

/forum/functions/functions_common.asp, line 726

this is most likely due to a bad upgrade from 7 to 8 (totally my fault)

the strange thing is, line 726 is a comment:
'Query the database


so no idea whats going on here Dead
if anyone has any idea what it might be let me know
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
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: 16 April 2006 at 1:06pm
The only thing I can think is that you have a corrupted file.

Try reuploading the original files again to the server.
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2006 at 1:15pm
i dont think it is a currupt file

after your reply i did a google on it and found this:

http://support.microsoft.com/?kbid=840208
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
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: 16 April 2006 at 1:20pm
Looks like a bug with SQL Server 2000 then.

Although the article gives a hotfix for SQL Server, it doesn't say if anything can be changed in the SQL query to remedy this.
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2006 at 1:43pm
am conviced it was my failed upgrade, then bodged fix

i copied the function for updating the thread stats and put it in its own little page

and it now reports the correct line for the error

        'Get the start and last post ID's from the database
        strSQL = "SELECT " & strDbTable & "Thread.Thread_ID " & _
        "FROM " & strDbTable & "Thread" & strDBNoLock & " " & _
        "WHERE " & strDbTable & "Thread.Topic_ID = "  & lngTopicID & " " & _
            "AND " & strDbTable & "Thread.Hide = " & strDBFalse & " " & _
        "ORDER BY " & strDbTable & "Thread.Message_date ASC;"
       
        'Set the cursor type property of the record set to Dynamic so we can navigate through the record set
        rsCommon.CursorType = 2
       
        'Set set the lock type of the recordset to adLockReadOnly
        rsCommon.LockType = 1
       
        'Query the database
        rsCommon.Open strSQL, adoCon


does this help? or is it the database? and not my failed upgrade?
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2006 at 1:59pm
ok, just thought id give an update

to try and get it working i started to play with the SQL (eg take out that strDBNoLock thing [what is that??] etc)

and i changed:
"ORDER BY " & strDbTable & "Thread.Message_date ASC;"

to
"ORDER BY " & strDbTable & "Thread.Thread_ID ASC;"
and it begain working with zero errors

i suggested/requested before that you order topics by Thread ID and NOT the thread date, as ive expirenced alot of server time problems where the time would change maybe forward or back a couple of hours, which totally screws with post orders, an older post can be ater a newer post

can you tell me why you order by date? as i see no reason why you dont order by ID
(i dont mean to sound arrogant or anyfin, i genuinely would like to know)

anyway i thought id give the fix if anyone else experinced the probelm
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
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: 16 April 2006 at 2:32pm
The strDBNoLock part is for performance only and just tells the database not to lock the database while the read is taking place (a dababase dirty read)

You can take this out if you like as it will not make much difference.

However, the order by needs to be by Message_date ASC, otherwise yoy may get problems with your forum displaying the incorrect post as the last post in the forum etc.
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2006 at 2:48pm
Quote However, the order by needs to be by Message_date ASC, otherwise yoy may get problems with your forum displaying the incorrect post as the last post in the forum etc.


but the thread id is the order of them being added - which is what i dont understand

if it goes 1,2,3 and not 1,3,2 - why use date, which i see as less concistant
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
 Post Reply Post Reply Page  12>

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.