Kesch
Kesch

Reputation: 13

Get returned values from table-valued function using SQLdatasource

I made a simple Table-valued function that returns an Integer and a string. I've looked around but couldn't find anything about retrieving the returned data with a SQLdatasource.

I've tried using it the same way I used it for a scalar-valued function but then I keep getting the error:

The request for procedure 'x' failed because 'x' is a table valued function object.

Is it even possible to call a table-valued function using a SQLdatasource?

Upvotes: 1

Views: 1060

Answers (1)

suff trek
suff trek

Reputation: 39777

If you want to use table-valued function this way, you need to make it a part of a query. E.g.

SELECT * FROM MyTableValuedFunc()

and use that query in your SQLdatasource

Upvotes: 2

Related Questions