简体   繁体   中英

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?

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

SELECT * FROM MyTableValuedFunc()

and use that query in your SQLdatasource

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM