471,330 Members | 1,508 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

I think I found a bug in VS 2005 Datasets

If you use the Dataset editor to create a "new stored procedure" that
returns an single integer, it creates a matching method in the
TableAdapter that returns an object. If you delete the method, then
add a query that uses an "existing stored procedure" and select the
*exact same SP*, and tell the wizard that it returns a single value,
the created method returns a nullable int. I don't think this is
supposed to happen.

Example:

Add --Query --New stored procedure --SELECT which returns a
single value

SELECT MIN(fooId) FROM dbo.tblFoo
WHERE fooName = @fooName;

Name the SP FindFoo, and call the function the same thing.

The generated function (tblFooAdapter.FindByName) will have return
type "object", even though if you go into the Parameters collection
editor for the function, @RETURN_VALUE has type provider Int.
Now, delete FindFoo from your TableAdapter. Add --Query -->
Existing stored procedure. Select FindFoo, tell the wizard that it
returns a single value, enter a function name. Your new function will
return a Nullable<intinstead of an object. Bug?
Apr 3 '08 #1
0 819

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by John Bailey | last post: by
14 posts views Thread by NormD | last post: by
reply views Thread by Alex Kolesnichenko | last post: by
12 posts views Thread by BillE | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.