Script for updating Relastionships?
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=21229
Printed Date: 09 April 2026 at 3:27am Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Script for updating Relastionships?
Posted By: McTurok
Subject: Script for updating Relastionships?
Date Posted: 05 September 2006 at 5:22pm
Hi Everyone,
I just installed 8.03 on a new server, but I did this from an update from 7.x.
What I did was transfer over my current forums via MS Eterprise Mgr. This created all my tables (7.x) and brought over all my data along with it to my new MSSQL server.
I then ran the update script to upgrade to 8.x tables. This worked fine too.
I'm now trying to update the new forum permissions and I'm getting this error.
Microsoft OLE DB Provider for SQL Server error
'80040e2f'
Cannot insert the value NULL into column 'Author_ID',
table 'tds_db.dbo.tblPermissions'; column does not allow nulls. INSERT
fails.
/forum/admin_forum_details.asp, line 308 |
I'm guessing it's becuase during the transfer to my new server the relationship between the tables was not kept.
Any sql scripts I can run to update these relationships?
Thanks, Chris
|
Replies:
Posted By: WebWiz-Bruce
Date Posted: 06 September 2006 at 11:25am
It looks like in the transfer process you lost the default values for tables, the relationships are not important but the index's they create could effect performance.
I would try using a different method to move your SQL Server database in Enterprise Manager until you find a method that will work for you and move across the default value also.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: McTurok
Date Posted: 06 September 2006 at 3:19pm
I've discovered the problem. I re-did everything and I was getting the same result.
I had to go into the permissions table and change all fields to allow nulls to get rid of the error and discovered that it is not inserting the Author_ID into the table.
This is the problem and I'm not sure why or how to fix it.
Any ideas why I can log on fine but yet this field is not being stored correctly?
|
Posted By: WebWiz-Bruce
Date Posted: 06 September 2006 at 4:24pm
You can transfer your SQL Server database using SQL Server but the way you are presently doing is not correct.
I no-longer use SQL Server Enterprise Manager but as far as I recall you need to select the import/export DTS tool then select the configuration option that allows the must number of choices, then go through the screens selecting to have everything copied over except permissions and server roles. By doing it this way it should also copy across index's, default values, etc. for your database.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
|