Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Carlos Marques 1 post 71 karma points
    Jul 08, 2020 @ 18:36
    Carlos Marques
    0

    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.

  • 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.

Please Sign in or register to post replies