Archive

Posts Tagged ‘error’

Operation is not valid due to the current state of the object.


Error : Operation is not valid due to the current state of the object.

When there is a postback with large number of form fields such error occurs.

Stack trace :
at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() at System.Web.HttpValueCollection.FillFromEncodedBytes

By default, the maximum value of MaxHttpCollection is 1000.
To solve this error, increase the MaxHttpCollection value. Try adding the following setting in your web.config’s <appsettings> block.

<appSettings>

<add key=”aspnet:MaxHttpCollectionKeys” value=”2001″ />

</appSettings>

SQL: Alter script to change the Primarykey Column datatype

February 23, 2015 Leave a comment

–This will drop the primary key constraint
ALTER TABLE [pTARGET_TYPE] DROP CONSTRAINT PK_TARGET_TYPE

–Alter datatype
ALTER TABLE [TARGET_TYPE] ALTER COLUMN [TARGET_TYPE_ID] INT NOT NULL

–Add Primary key constraint
ALTER TABLE [TARGET_TYPE] ADD CONSTRAINT PK_TARGET_TYPE PRIMARY KEY ([TARGET_TYPE_ID])

MySQL Error: The user specified as a definer does not exist

October 17, 2014 Leave a comment

Error :

the user specified as a definer (‘root’@’%’) does not exist

 

Solution :

grant all on *.* to ‘root’@‘%’ identified by ‘password’ with grant

 option;
Categories: Sql Server Tags: , , ,