Security(Problem with create role )[modified]
-
Hi friend please can you tell me how to solve this problem.When i try to create new role is appear this exception? " Cannot insert the value NULL into column 'RoleId', table 'C:\WEB-PROJECT\02.12.2007\APP_DATA\IVOIRENETPUB.MDF.dbo.aspnet_Roles'; column does not allow nulls. INSERT fails. " Even if i use asp.net configuration!!! Good bye -- modified at 2:46 Thursday 15th February, 2007
when i want to read something good just seat and type it
-
Hi friend please can you tell me how to solve this problem.When i try to create new role is appear this exception? " Cannot insert the value NULL into column 'RoleId', table 'C:\WEB-PROJECT\02.12.2007\APP_DATA\IVOIRENETPUB.MDF.dbo.aspnet_Roles'; column does not allow nulls. INSERT fails. " Even if i use asp.net configuration!!! Good bye -- modified at 2:46 Thursday 15th February, 2007
when i want to read something good just seat and type it
Then.. RoleID might be primary key or identity which is not allowed to add NULL value. if you wanna add it then you may change your database design. if I'm in wrong direction then you can show me your current table design.
Thanks and Regards, Michael Sync Blog: http://michaelsync.net
-
Then.. RoleID might be primary key or identity which is not allowed to add NULL value. if you wanna add it then you may change your database design. if I'm in wrong direction then you can show me your current table design.
Thanks and Regards, Michael Sync Blog: http://michaelsync.net
hi again the table is create automaticly by visual studio when you use asp.net configuration that is way i don't change nothing but has you see is appear some exception!Did you have idea how to solve the problem. GO /****** Object: Table [dbo].[aspnet_Roles] Script Date: 02/15/2007 21:55:11 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[aspnet_Roles]( [ApplicationId] [uniqueidentifier] NOT NULL, [RoleId] [uniqueidentifier] NOT NULL, [RoleName] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [LoweredRoleName] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Description] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY]
when i want to read something good just seat and type it
-
hi again the table is create automaticly by visual studio when you use asp.net configuration that is way i don't change nothing but has you see is appear some exception!Did you have idea how to solve the problem. GO /****** Object: Table [dbo].[aspnet_Roles] Script Date: 02/15/2007 21:55:11 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[aspnet_Roles]( [ApplicationId] [uniqueidentifier] NOT NULL, [RoleId] [uniqueidentifier] NOT NULL, [RoleName] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [LoweredRoleName] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Description] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY]
when i want to read something good just seat and type it
Check it out here.. >> [RoleId] [uniqueidentifier] NOT NULL, that means this column doesn't accept any NULL value. Why do you want to add NULL value? it will work if you don;t add any NULL value to this column.. However, in case you have to add NULL value then... you can remove "NOT NULL" from this statement..
Thanks and Regards, Michael Sync Blog: http://michaelsync.net
-
Check it out here.. >> [RoleId] [uniqueidentifier] NOT NULL, that means this column doesn't accept any NULL value. Why do you want to add NULL value? it will work if you don;t add any NULL value to this column.. However, in case you have to add NULL value then... you can remove "NOT NULL" from this statement..
Thanks and Regards, Michael Sync Blog: http://michaelsync.net
-
Thank's i will try it but i am not sure that is correct because if i made change after that is possible other function to don't work.((
when i want to read something good just seat and type it
-
Thank's i will try it but i am not sure that is correct because if i made change after that is possible other function to don't work.((
when i want to read something good just seat and type it
>>Thank's i will try it Your welcome. my friend. >>but i am not sure that is correct because if i made change after that is possible other function to don't work.(( ya. it might be possible.. I'd suggest you that better if you add a values for that column instead of adding NULL value.
Thanks and Regards, Michael Sync Blog: http://michaelsync.net
-
>>Thank's i will try it Your welcome. my friend. >>but i am not sure that is correct because if i made change after that is possible other function to don't work.(( ya. it might be possible.. I'd suggest you that better if you add a values for that column instead of adding NULL value.
Thanks and Regards, Michael Sync Blog: http://michaelsync.net
The problem is that ms create all this table for you automaticly with lot of code and i want to use that code.If i change db after i must change code in all application and believe that is lot of work :(( i think something is not right with my db but what ?Even that thank you for your answare
when i want to read something good just seat and type it