Last post Jul 17, 2012 09:28 PM by Decker Dong - MSFT
Jul 16, 2012 04:36 AM|MartinBCN|LINK
I can't get the syntax for the call of a scalar-valued function right.
I do dbo.function() which works in SQL management studio but leads to an error if used in the select clause of the asp:sqldatasource module. Very strange
How does this work?
Jul 16, 2012 05:12 AM|MartinBCN|LINK
... as so often this was related to user access.
With only the role membership db_datareader granted, one can't execute a function. Wonder what the minimum permission set is to enable the execution of a function; now I gave Ownership which is too much, but I need this thing to work
Jul 16, 2012 05:20 AM|Mudasir.Khan|LINK
result of dbo.function() it cannot be holded using executeScalar try using executeReader();
Jul 17, 2012 09:28 PM|Decker Dong - MSFT|LINK
Call a scalar-valued Function from asp:sqldatasource
Generally speaking, I prefer to use a manual ADO.NET——SqlCommand to execute the scalar -valued function, don't forget to set the SqlCommand's CommandType as "StoredProcdure".