Print Page | Close Window

'Group_ID' - Cannot insert the value NULL

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=21808
Printed Date: 29 March 2026 at 12:33pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: 'Group_ID' - Cannot insert the value NULL
Posted By: MortiOli
Subject: 'Group_ID' - Cannot insert the value NULL
Date Posted: 01 November 2006 at 9:08pm
I'm having problems adding a user permission in admin_user_permissions.asp and was hoping someone might be able to help...
 
After trying to update the permissions for someone, I receive the following error message;
 
Microsoft OLE DB Provider for SQL Server error '80040e2f'

Cannot insert the value NULL into column 'Group_ID', table 'databasename.dbo.tblPermissions'; column does not allow nulls. INSERT fails.

/forum/admin_user_permissions.asp, line 140

I'm using MS SQL, and when I try and edit the table (to enable NULLS) I receive the following error;
 
Error:   Incorrect syntax near the keyword 'Read'.
Source:   .Net SqlClient Data Provider
 
Has anyone ever received this error before, and if so, how do I fix it so I can update users permissions?
 
Many thanks in advance!



Replies:
Posted By: WebWiz-Bruce
Date Posted: 02 November 2006 at 9:32am
It sounds to me that you may have done some type of database migration from another database type like Access or you have moved the database from another server and not all the default values have been passed across to your present database.

The table tblPermissions the following fields need to NOT allow nulls and have the default value of 0

Group_ID
Author_ID
Forum_ID


-------------
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: MortiOli
Date Posted: 02 November 2006 at 12:25pm
Yeah, back in the 7.x days, I migrated from Snitz, then further on, upgraded to 8.x
 
My tblPermissions currently looks like the below - does anything else need changing?
 
 
Name Data Type Size Nulls Default
Group_ID int 4 N  
Author_ID int 4 Y  
Forum_ID int 4 Y  
Read bit 1 Y (0)
Post bit 1 Y (0)
Reply_posts bit 1 Y (0)
Edit_posts bit 1 Y (0)
Delete_posts bit 1 Y (0)
Priority_posts bit 1 Y (0)
Poll_create bit 1 Y (0)
Vote bit 1 Y (0)
Attachments bit 1 Y (0)
Image_upload bit 1 Y (0)
Moderate bit 1 Y (0)
View_Forum bit 1 N (1)
Display_post bit 1 N (0)
Calendar_event bit 1 N (0)
 
 
From looking at the msSQL_server_setup.asp, I assume it's supposed to look like this;
 


Posted By: WebWiz-Bruce
Date Posted: 02 November 2006 at 5:11pm
Yes the second one looks more correct, except you can delete the 'Read' field as that is no-longer used in version 8.

-------------
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: MortiOli
Date Posted: 02 November 2006 at 6:46pm
Thanks Borg.
 
Any ideas on what this error means though, as it's what I receive when I try and remove the field in ASP.Net Enterprise Manager;
 
The object 'DF_tblPermissions_Read' is dependent on column 'Read'. ALTER TABLE DROP COLUMN Read failed because one or more objects access this column.
 
Thanks


Posted By: WebWiz-Bruce
Date Posted: 02 November 2006 at 6:48pm
You should use something like Microsoft's SQL Management Studio to remotely administer SQL Server

-------------
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: MortiOli
Date Posted: 02 November 2006 at 8:29pm
Thanks Borg - seems a great program, and free, suprisingly!
 
Managed to change all but one setting - currently logged with my host.
 
Cheers!



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