Saturday, February 25, 2012

preview data, it gives you incorrect results

I am reposting this to a different forum, becasue I got not response...

Using VS05 SP1 Pro SQL Express…

Take a simple stored procedure like the following to return a specific column from a specific row in a data table ....

SELECT fld_IX_UserID

FROM UserIDs

WHERE (fld_UserID_Table_ID = @.USERID_TABLE_ID)

It works fine in Store Procedure, and if you create at table adapter to reference it, that works fine as well.

Here is the issue. In the store procedure (i.e. under Server Explorer), when you execute the command to test it, it gives you the correct results. In Edit with Dataset Designer, Table Adapater, if you highlight it, right click preview data, it gives you incorrect results. In code, the table adapter gives you the correct resutls.

In every case, Preview Results for a table adapter built on a stored procedure will give you the wrong results. This is clearly a bug and can result in a log of wasted time.

Am I missing something? FYI, I realize I don't need to use the Table Adapater to execute the above stored procedure, but we are using table adapters for everything to be consistent.

Thanks,

Bob

i am not good in .net ... so i cannot comment on that.. but if you are getting different result while u run the same SP means the input parameter which you pass is differ for each run. check what is the value set for @.USERID_TABLE_ID in each run

Madhu

|||

No the stored procedure returnes the correct data every time.

It is the Preview Data, in the IDE table adapter designer view, that returns incorrect data everytime, but only for Store Procedures used as table adapters.

Bob

|||

Hi Bob,

I would suggest you post this bug to http://connect.microsoft.com. You should be able to find the VS Connection and enter the issue there. That will put the issue into their tracking system. Since bad data is happening only through VS, it should be filed with VS.

Mike

No comments:

Post a Comment