Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Upgrade Issue with MSSQL
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Upgrade Issue with MSSQL

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

Joined: 29 June 2003
Location: United States
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote imhotep Quote  Post ReplyReply Direct Link To This Post Topic: Upgrade Issue with MSSQL
    Posted: 05 August 2006 at 11:41pm
I recently did the upgrade using the upgrade tool for MSSQL Server and everything shows up fine, but I am getting errors when trying to post new topics. I am getting this:

Server Error in Forum Application
An error has occured while writing to the database.
Please contact the forum administrator.

Support Error Code:- err_SQLServer_save_new_post_data
File Name:- new_post.asp

Error details:-
ADODB.Recordset
Item cannot be found in the collection corresponding to the requested name or ordinal.

Can anyone help me out with this? What is going wrong here?
Man Know Thyself
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: 06 August 2006 at 11:28am
It sounbds like you didn't upgrade the database properly.

Do the upgrade tool show an error when doing the upgrade?
Did you modify your 7.x database that you performed the upgrade on?

If you did modify your 7.x database then you need to go back to your 7.x backup database, remove any modifications, then run the upgrade tool.
Back to Top
imhotep View Drop Down
Groupie
Groupie
Avatar

Joined: 29 June 2003
Location: United States
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote imhotep Quote  Post ReplyReply Direct Link To This Post Posted: 06 August 2006 at 2:27pm
There were no modifications to the database: just the home page. The error I got during installation was this

rror Discription: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
SQL Server database is set up, but with Error!

I don't know why it says it doesn't exist, but did all of the other upgrades.

Should I have run the setup from the new board (to create the tables) and then do the upgrade? WHo should I set as the the database owner?
Man Know Thyself
Back to Top
imhotep View Drop Down
Groupie
Groupie
Avatar

Joined: 29 June 2003
Location: United States
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote imhotep Quote  Post ReplyReply Direct Link To This Post Posted: 06 August 2006 at 2:40pm
Also when I try to view a topic, i get this error:

Server Error in Forum Application
An error has occured while executing SQL query on database.
Please contact the forum administrator.

Support Error Code:- err_SQLServer_get_topic_posts_data
File Name:- forum_posts.asp

Error details:-
Microsoft OLE DB Provider for SQL Server
Invalid column name 'Hide'.




What could be the problem?
Man Know Thyself
Back to Top
imhotep View Drop Down
Groupie
Groupie
Avatar

Joined: 29 June 2003
Location: United States
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote imhotep Quote  Post ReplyReply Direct Link To This Post Posted: 06 August 2006 at 3:13pm
I added the field "Hide" into the tblThreads post and set it's value to "o" (at least for testing. It is a "bit" field. At first I couldn't get into the hidden fields section because the field didn't exist. Now it shows up and it will say that there are no hidden post to view. So that works fine.

But when trying to view topics now, I am getting:

Quote

Microsoft VBScript runtime error '800a005e'

Invalid use of Null: 'CBool'

/forum_temp/forum_posts.asp, line 779


I know it has to deal with a boolean value, but what should I set the field values to to correct this?

This is the code the error is calling attention to
Quote blnHidePost = CBool(sarryPosts(5,intCurrentRecord))


In the documentation, the changes given to the database are:

Quote Changes to tblThread
New fields:-
1. Hide - data type = true/false - default value = false
2. File_uploads - data type = text 255 characters


But there is no "true/false" datatype in SQL Server. I saw in the "msSQL_server_update.asp" file what to set it as and I did, but I get this error trying to update the SQL Server field:

Quote 'tblThread' table
- Unable to modify table. 
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'Hide', table 'mocha_db.dbo.Tmp_tblThread'; column does not allow nulls. INSERT fails.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.


Another thing I've noticed is that I can add new content to the database. I just can't pull up the old content when I click on a forum topic. So what I think it is is simply that it is not adding the default value to the tblThreads table in each field, but it is adding it to new post.

How can I give all of the fields the default value in the actual table?


Edited by imhotep - 06 August 2006 at 7:02pm
Man Know Thyself
Back to Top
imhotep View Drop Down
Groupie
Groupie
Avatar

Joined: 29 June 2003
Location: United States
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote imhotep Quote  Post ReplyReply Direct Link To This Post Posted: 06 August 2006 at 8:12pm
I figured out the problem. What happen was, I didn't set the datatype correctly when I first entered the field. I think I had it at interger or something. So it automatically placed NULL values in each row.

So when I switched the datatype to "bit" it still had the values already in the fields. So after much experimenting, I simply deleted the field and then recreated the field using the correct values (bit with default value of 0) and it works fine now.

But thanks.
Man Know Thyself
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.