Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - err_SQLServer_save_new_post_data
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

err_SQLServer_save_new_post_data

 Post Reply Post Reply Page  12>
Author
dbramley View Drop Down
Groupie
Groupie


Joined: 24 April 2008
Status: Offline
Points: 118
Post Options Post Options   Thanks (0) Thanks(0)   Quote dbramley Quote  Post ReplyReply Direct Link To This Post Topic: err_SQLServer_save_new_post_data
    Posted: 22 November 2011 at 1:08pm
Hi,
Moved database from one host to another (MSSQL). Just created a .bak file and then restored to the other server. I'm now receiving this error when trying to post:

Support Error Code:- err_SQLServer_save_new_post_data
File Name:- new_post.asp
Forum Version:- 10.03

Error details:-
Microsoft OLE DB Provider for SQL Server
Cannot insert the value NULL into column 'Thanks', table 'jukeowners.dbo.tblThread'; column does not allow nulls. INSERT fails.

Any idea what it could be?

Thanks
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 November 2011 at 2:23pm
It would appear that the database has lost it's default value for tblAuthor.Thanks which should have the default value of 0.

You may want to check the rest of the database to make sure that it has not lost any other default values or primary keys.
Back to Top
dbramley View Drop Down
Groupie
Groupie


Joined: 24 April 2008
Status: Offline
Points: 118
Post Options Post Options   Thanks (0) Thanks(0)   Quote dbramley Quote  Post ReplyReply Direct Link To This Post Posted: 22 November 2011 at 2:24pm
thanks for prompt reply, so can I just edit that table and ensure the default value 0 is in?
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 November 2011 at 3:28pm
Yes that is correct
Back to Top
dbramley View Drop Down
Groupie
Groupie


Joined: 24 April 2008
Status: Offline
Points: 118
Post Options Post Options   Thanks (0) Thanks(0)   Quote dbramley Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2011 at 9:46am
Hi,
Sorry Bruce, could you help a little further. I've been through and corrected each NULL error and ensured that the default value is 0.

The trouble is, that whilst I can now post they end up on random topics and posts.

So, I post a new topic, it will append itself to an already existing topic! help!

I don't suppose you have a SQL script I could run to correct any database errors do you?

Or do you have a full list of how everything can be setup? i don't mind paying if needs be.

Finally, I think the issue is occurring because we don't have full admin rights and can't do a full 'restore'. We can only use the wizard to copy all tables and data from one database to another. This is out of my control unfortunately and I can't get full rights.

Thanks for your help.
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 November 2011 at 11:32am
You can not use the import/export to move the database as it will only migrate the data and much if the database schema will be dropped, such as Primary Key, Foreign Keys, Indexes, Default Values, Auto Numbers, etc.

Trying to rebuild the missing schema would take a Database Admin many hours to do and if you do not have the skills there is little chance of doing this and ending up with a stable database at the end.

What you need to do is contact the admo of the SQL Server that you are moving the database from and request a backup of the database. This will be a .bak file. This can then be used to restore  the database to the new server.
Back to Top
dbramley View Drop Down
Groupie
Groupie


Joined: 24 April 2008
Status: Offline
Points: 118
Post Options Post Options   Thanks (0) Thanks(0)   Quote dbramley Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2011 at 12:59pm
Thanks - I'm the admin on the existing server so can get a .bak file no problem. The problem is no admin on the other server to restore from the .bak. We've raised a ticket from the host for them to (fingers crossed) do a restore for us.

To be honest, I tried for hours last night to rebuild the primary keys but was just getting nowhere.

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 November 2011 at 1:18pm
Most good hosts these days will give you a backup and restore tool for SQL Server Database.

Our own hosting services come with a range of different backup and restore tools to allow SQL Server Databases to be easily moved.
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.