Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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?

share|improve this question
    
What do you mean "using it the same way I used it for a scalar-valued function" - have you used a scalar-valied function in the SQLDatasource? –  Yuriy Galanter Sep 30 '13 at 13:40

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.