locked
make dynamic procedure a Complex type RRS feed

  • Question

  • User-2012457684 posted

    Our company uses stored procedures to handle all database calls.  

    I have updated my model to include a certain procedure.  It did not show in the model under solution explorer.   So I checked the model browser and under the model it is in the function imports but not in the complex types.    When I double click on that sproc in the list and then click on the Get Column Information button it returns the message

    "The selected stored procedure or function returns no columns"

    I know that I am getting this message because it is a dynamic procedure.   Is my solution as simple as adding a class in the model with all of the column information?  If not what can i do to make this a complex type?   

    Thursday, October 24, 2019 4:57 PM

Answers

  • User-474980206 posted

    yes, you just manually define the response type. one assure to be ware of, is that using an if statement a SP can return different result types, there is no support for this.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 24, 2019 5:27 PM

All replies

  • User-474980206 posted

    yes, you just manually define the response type. one assure to be ware of, is that using an if statement a SP can return different result types, there is no support for this.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 24, 2019 5:27 PM
  • User-2012457684 posted

    Thanks.   The more I thought of this I realized I already have something else partially in place to handle this so I just needed to insert some info from a few more tables into a centralized table that way I can do away with the dynamic procedure.    Most of what I am currently writing was originally done on 5.25 floppy disk for a desktop environment.   Since storage space was such a premium they originally kept the db tables very small. But i don't need to worry about that now  since it is running on SQL server so I can combine into a single table and work from there.  

    Thursday, October 24, 2019 6:38 PM