I need to update the dataset table adapter in Visual Studio 2010. It is based on a stored procedure. The parameters in the store process
@IDportfolio INT, @ date varchar (50) = tap, @IDorder int = NULL, @IDsession nvarchar (300) = NULL, @User varchar (100) = NULL These methods of Table Optimizer were: , GetData (@Edportfolio,), @DudeNXXML, NVARCHAR (MAX) = NULL, @DEBUG INT = 0 @date, @didder, @ idsense, user, @Udn) So I have to refresh it. In the process there is an IF statement which is executed only if @DEBUG is set to 1, then it is executed. Inside this IF statement uses some SELECT statements for internal debugging. Value 1 is not clearly a default value as can be seen in the signature, yet the designer, refreshing the methods, as if it is sending the value 1 for the @DEBUG parameter. Therefore, instead of returning values it sets the wrong values, and the designer tries to make methods based on these returned values.
Why is the designer doing such a thing and has some default values for INT parameters, or is it ignoring the default values? I have also seen similar behavior in the unit framework.
OK Ok (VS) designer needs to determine the sent value (criteria) and Return value (column and data type). (To generate affiliate classes) This uses which can be called loosely reflection; To do this, stored procedures should be in line with some rules, 4 above my head has been discovered, important here 3:
- Only one row set can be returned (this is clearly stated somewhere by MS)
- The row set must be consistent outside the stored procedure That is it Can come from a table variable. (This is clearly stated somewhere by MS)
- It should be deterministic. (This is clearly stated somewhere by the MS)
Using the debug parameter, which will never be set to calling softwire 1, run the Pro for testing and various points However, in the collected procedure, however, VS will allow different values to be returned. For the designer, because these rows (by defualt) are not back, VS Process will still behave while analyzing by.
No comments:
Post a Comment