--------------------------------------------------------------- Log Entry : 4/19/2024 3:42:50 PM - ------------------------------------------------------------- SettingsController Method:PostRole System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint 'pk_t_s_RoleDetails'. Cannot insert duplicate key in object 'dbo.t_s_RoleDetails'. The duplicate key value is (6, 19, 12). The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Sang.Asset.WebAPI.General.ClassDB.ExecuteNonQuery(String commandText, CommandType commandType, SqlParameter[] parameters) at Sang.Asset.WebAPI.Controllers.Sang.Asset.WebAPI.Controllers.SettingsController.PostRole(Role obj) ClientConnectionId:d582200d-d21c-4c1e-bf9a-f168847ba905 Error Number:2627,State:1,Class:14 --------------------------------------------------------------- Log Entry : 4/19/2024 4:02:54 PM - ------------------------------------------------------------- obj={"sName":"AssetTest1","sCode":"","sAltName":"","sBarcode":"","sRegNo":"","sInvNo":"","iAssetType":0,"iAssetSubCategory":0,"iCompany":12,"iLocation":0,"iSupplier":0,"iProject":0,"iWarehouse":14,"iPurchaseDate":"2024-04-19","fPurchaseValue":0,"fCumDeprValue":0,"fInsuredValue":0,"fScrapValue":0,"fITDeprRate":0,"fITAccr":0,"fQty":1,"sImagePath":"","image":null,"bDepreciable":true,"iDepreciation":1,"iUnitOfUsage":1,"fLifePeriod":1,"iDateOfCommencement":"2024-04-19","iWriteOfPeriodYr":1,"iWriteOfPeriodMonth":12,"iAssetAc":0,"iAccumDeprAc":0,"iDeprPLAc":0,"iDisposalGain":0,"iDisposalLoss":0,"sModel":" ","sMake":" ","sDateYear":" ","sSection":" ","iId":0,"iUser":11} --------------------------------------------------------------- Log Entry : 4/19/2024 4:45:54 PM - ------------------------------------------------------------- obj={"sName":"AssetTest2","sCode":"","sAltName":"","sBarcode":"","sRegNo":"","sInvNo":"","iAssetType":0,"iAssetSubCategory":0,"iCompany":3,"iLocation":0,"iSupplier":0,"iProject":0,"iWarehouse":3,"iPurchaseDate":"2024-04-19","fPurchaseValue":0,"fCumDeprValue":0,"fInsuredValue":0,"fScrapValue":0,"fITDeprRate":0,"fITAccr":0,"fQty":1,"sImagePath":"","image":null,"bDepreciable":true,"iDepreciation":1,"iUnitOfUsage":1,"fLifePeriod":1,"iDateOfCommencement":"2024-04-19","iWriteOfPeriodYr":1,"iWriteOfPeriodMonth":12,"iAssetAc":0,"iAccumDeprAc":0,"iDeprPLAc":0,"iDisposalGain":0,"iDisposalLoss":0,"sModel":" ","sMake":" ","sDateYear":" ","sSection":" ","iId":0,"iUser":11}