Print Page | Close Window

Strange Error when posting message.

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=19337
Printed Date: 12 April 2026 at 7:57am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Strange Error when posting message.
Posted By: Scotty32
Subject: Strange Error when posting message.
Date 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 - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .



Replies:
Posted By: WebWiz-Bruce
Date 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.


Posted By: Scotty32
Date 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 - http://support.microsoft.com/?kbid=840208


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: WebWiz-Bruce
Date 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.


Posted By: Scotty32
Date 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 - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: Scotty32
Date 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 - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: WebWiz-Bruce
Date 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.


Posted By: Scotty32
Date 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 - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: WebWiz-Bruce
Date Posted: 16 April 2006 at 3:24pm
Looking at it again you could get away with using the ID number, but as you want the order to be from the first posted date to the last posted date, by using the ID number there is some room for problems if for whatever reason the dates of the posts don't exactly match the ID order.


Posted By: Scotty32
Date Posted: 16 April 2006 at 5:39pm
do you mean becose the thread is ordered by date and the "last posted" works of ordering by ID?

i intend to change the thread ordering by ID too - so there should be no problems

am just curious as to why threads are ordered by date rather than id
since (as i stated) problems arise from ordering by date.

as far as am aware the higher the ID, the later it was posted, so i assume its impossible to acctually change the ordering of IDs when posting (eg you cant get a lower ID than any post before you)

but with ordering by date, if the server time messes up, you can get your post before the others in the thread (if it went back in time) or if it goes forward, newer posts will go before the older posts once the server time is corrected (i had this problem so i changed it on my V7)

i personally am not aware of any benefits for ordering by Date, but am assure you have a reason

(again, am not trying to be annoying, just trying to find out why you use Date, if theres a reason i'll keep it otherwise if its just something you've done id rather change it to ID)


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: WebWiz-Bruce
Date Posted: 16 April 2006 at 5:50pm
The only reason is that the part in question gets the stats for the topic, which means that it needs to get the details of the first post posted and the last post posted in the topic.

The ID field should be OK, as in theory the newer posts should have a new ID number. The only time it would mess up is if some how the latest post in a topic doesn't have the highest ID number, if a post has been edited or moved from another topic.


Posted By: Scotty32
Date Posted: 17 April 2006 at 3:23pm
urr - i just found out that delete_post.asp doesnt use the function

could you tell me ALL the pages that use the "order by date" ?

so far i got:
functions_common.asp
delete_post.asp


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: WebWiz-Bruce
Date Posted: 18 April 2006 at 9:10am
Sorry I can't remember without going through each and every individual file.



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