OK well the (VS) designer needs to determine the sent values (parameters) and the returned values (columns and data types). (to generate associated classes). It uses what could loosely be called reflection. To do this the stored procedure must conform to certain rules, there are 4 i've discovered, off the top of my head, here are the important 3:
- Only one row set can be returned (this is explicitly stated by MS somewhere)
- The row set must be persistent outside the stored procedure i.e. it cant come from a table variable. (this is explicitly stated by MS somewhere)
- It must be deterministic. (this is explicitly stated by MS somewhere)
Using a debug parameter, which the calling softwaer will never set to 1 will allow you to run the proc for testing and return various value at different points in the stored procedure. However for the VS designer, because these rows are not (by defualt) returned, the proc will still behave when analysed by VS.