Insert into a view with a trigger returns Dnbull error, change is ok
I am using UIOMatic to insert into a View with a trigger instead of insert. The record is inserted but I receive an error:
"Object cannot be cast from DBNull to other types".
And the following details:
Exception Details
System.InvalidCastException: Object cannot be cast from DBNull to other types.
Stacktrace
at System.DBNull.System.IConvertible.ToInt64(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType)
at Umbraco.Core.Persistence.Database.PocoColumn.ChangeType(Object val)
at Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco)
at UIOMatic.Data.DefaultUIOMaticRepository.Create(Object entity)
at UIOMatic.Services.PetaPocoObjectService.Create(Type type, IDictionary2 values)
at UIOMatic.Web.Controllers.ObjectController.Create(ObjectPostModel model)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.
Insert into a view with a trigger returns Dnbull error, change is ok
I am using UIOMatic to insert into a View with a trigger instead of insert. The record is inserted but I receive an error: "Object cannot be cast from DBNull to other types".
And the following details:
Exception Details System.InvalidCastException: Object cannot be cast from DBNull to other types. Stacktrace at System.DBNull.System.IConvertible.ToInt64(IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType) at Umbraco.Core.Persistence.Database.PocoColumn.ChangeType(Object val) at Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco) at UIOMatic.Data.DefaultUIOMaticRepository.Create(Object entity) at UIOMatic.Services.PetaPocoObjectService.Create(Type type, IDictionary
2 values) at UIOMatic.Web.Controllers.ObjectController.Create(ObjectPostModel model) at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary
2 arguments, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ApiControllerActionInvoker.is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.