locked
SqlDataSource Connection Wizard ControlParameter crashes RRS feed

  • Question

  • User-491804336 posted

    When I add a SqlDataSource to my project, connect to a DB using the connection wizard I run into a problem that will wi5ther just shut down the wizard or, under other conditions, shut down Visual studio.

    The crash happens when you have a select stored procedure that requires an input value such as an ID to retrieve all the records with that associated ID. I created a tool that has a list box and either a dropdown or a texbox depending on the users selection. In my tool I have a number of properties. As it turns out one of those properties I named "Modifiers" and this was causing the wizard to shut down when I got to the page that lets you tell the wizard where to get the ID need for the stored procedure. All of the selections work just fine until you select the "Control" option. The wizard shuts down immediately. I went into the code and added the control parameter manually and then went back into the wizard. This time, when I got to that page it shut Visual Studio down completely.

    When I changed the name of the property from "Modifiers" to "UseModifier" Everything worked perfectly. This solves my problem but I wonder if anyone has ever seen this before. It's possible that there is a variable in the wizard that is named "Modifiers" and I was just unlucky enough to find it.

    Does anyone have any insight on this?

    If you'd like to see it happen Create a SimpleDataBoundColumn (search on Google) and then add a property with that name. Create a stored procedure that needs an input value and then run the SqlDataConnection tool wizard to connect to the DB and that stored procedure. As soon as you try to select "Control" for the location of the input value the wizard will shut down. You don't even get the chance to make a selection so if only part of your code doesn't work it's not important.

    Wednesday, June 7, 2017 7:45 PM

All replies

  • User-359936451 posted

    Modifiers maybe  a reserved word. 

    Thursday, June 29, 2017 6:57 PM