| Author |
Topic Search Topic Options
|
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Post Options
Thanks(0)
Quote Reply
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:
so no idea whats going on here  if anyone has any idea what it might be let me know
|
|
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Post Options
Thanks(0)
Quote Reply
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
|
|
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Post Options
Thanks(0)
Quote Reply
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?
|
|
|
 |
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Post Options
Thanks(0)
Quote Reply
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
|
|
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Post Options
Thanks(0)
Quote Reply
Posted: 16 April 2006 at 2:48pm |
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
|
|
|
 |