LS HTML, some users cannot submit updates and they get a validation error RRS feed

  • Question

  • Hello LightSwitch,

    I have an app that has been running great for 2 years. This year some of my users have been getting a Validation error when they try to update a number field:

    Save Operation Failed

    Length cannot be more than 12.

    This is very odd because a) The field being updated is an Integer b) This field is the ONLY editable field in the table, and c) I do not have any validation on this field that would check for a length, only 1 condition in C# that ensures that a positive value is entered.

    I did make a few changes to the app this year, but nothing I would suspect could cause this. I added "Support paging" to the tables and have that set to 50. This works fine and in testing I did not see this validation error.

    I'm at my wits end trying to debug this thing. I have been grasping at straws and following many bad leads, looking for anything that looks odd or related :(. Like, the field in question, the column name happens to be 12 characters long... but how could that be the issue?

    Thanks for looking, Jeremy


    Monday, February 18, 2019 3:37 PM


  • Well, I still don't know what the issue was... but I was able to fix it.

    On a whim I used the 'Update Datasource' function and just clicked Next through the screens. Once I did that the save functions in the app started working properly again. This shouldn't have worked, no changes have been made to any of the SQL tables or views that the app uses. Maybe a glitch creeped into the datasource file and this process refreshed that...

    Anyway thanks for looking. If you even get weird "Save operation Failed" errors maybe try going through the Update Datasource process.


    • Marked as answer by Jeremy Crouch Tuesday, February 19, 2019 4:21 PM
    Tuesday, February 19, 2019 4:20 PM