Copied to clipboard

Flag this post as spam?

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


  • Edgar Rasquin 326 posts 925 karma points
    Oct 25, 2017 @ 06:06
    Edgar Rasquin
    0

    Invalid Column Name

    Hi,

    since I altered my Form by an additional Field I get this Error:

    • [0] {System.Data.SqlClient.SqlError: Invalid Column Name 'PositionPlus'.} object {System.Data.SqlClient.SqlError}

    Any idea how I could solve this?

    enter image description here

    Thanks

    EDIT: When trying to download a submission I'm getting this error:

    The key "PositionPlus" does not exist in ExpandoObject.

    enter image description here

  • Scott Meikle 28 posts 228 karma points
    Oct 25, 2017 @ 19:11
    Scott Meikle
    100

    Hi Edgar,

    Your first problem doesn't look like anything to do with the Form Storage package... it looks to me more like that maybe your form's model and table columns don't match up with each other.

    As for the second problem, this was a bug in the package - it didn't properly handle new fields being added to a form. I have fixed this in the latest version (0.5). Thanks for finding that for me :-)

    Kind regards,

    Scott

  • Edgar Rasquin 326 posts 925 karma points
    Oct 27, 2017 @ 14:43
    Edgar Rasquin
    0

    Hi Scott,

    thanks for your reply.

    Installing the latest Version solved the Download Issue. Thank you very much for this.

    Your Suggestion regarding model / table column does not make sense to me.

    Since the only Colums in the SQL table (FormStorageEntries) are

    • submissionID
    • fieldAlias
    • value

    it cannot match the colums specified in my model wich only match the Settings in the web.config where I set the key

    <add key="FormStorage:Subscribers" value="...
    

    Even deleting all values from the three tables in the db leads to the same result. Somehow the application seems to cache the aliasColums I declared in the first place but ignores columnes I added later.

    Any idea? Do I miss something?

  • Scott Meikle 28 posts 228 karma points
    Oct 27, 2017 @ 18:43
    Scott Meikle
    0

    Hi Edgar,

    The code snippet that you posted for your first problem doesn't have anything to do with the Form Storage package - it is part of either your own code or another third-party component in your code base. Try uninstalling the Form Storage package and commenting out any code referring to it - you will still get your error.

    The code in your screenshot looks to be trying to insert a record into a table (seemingly a contact table) and failing with an "invalid column" exception - and, to re-iterate, that is definitely not code that is in the Form Storage package. Try and find the code for the ContactModel class and you should see what database table the code is trying to write to. It looks like there is a column mismatch between that table and the ContactModel class.

    I'm sorry that I can't be of more help.

    Kind regards,

    Scott

  • Edgar Rasquin 326 posts 925 karma points
    Oct 28, 2017 @ 08:03
    Edgar Rasquin
    1

    Hi Scott,

    I'm really sorry. You were absolutely right. There was a code snippet that I totally forgot about. Now it's all working fine.

    Thanks again for your help!

    I have a suggestion regarding your package: Since I have a lot of columns they do not fit even if I spread my window over two screens. I know that I can hide columns by adjusting the web.config. But would it be a big chunk of work adding a detail view so you can open each row to view (or even edit) data in a form?

    Thank you and have a nice day.

    Edgar

  • Scott Meikle 28 posts 228 karma points
    Oct 28, 2017 @ 15:53
    Scott Meikle
    0

    Hi Edgar,

    I'm glad you got the problem sorted out in the end :-)

    Your suggestion is an interesting one - I am keeping a list of possible enhancements for a new version of the package when Umbraco v8 arrives so I might have a go at doing something along the suggested lines. I can't promise anything, though :-)

    Cheers,

    Scott

Please Sign in or register to post replies

Write your reply to:

Draft