UDF, SQLDataReader and C#

  • Thread starter Thread starter questions
  • Start date Start date
Q

questions

I wonder if someone can help me.

I have created a stored procedure that contains a UDF in the SELECT
statement.

i.e.
SELECT Table1.*, dbo.SomeFunction (Table1.Cost) AS SomeFunctionValue
FROM Table1

When this SP is executed through the query analyser, the expected
results are returned. But if I execute the same SP via C# code
(SqlDataReader or a SqlDataAdapter) the column that should have the
result of the UDF is alway NULL.

Can anyone offer any advice??

Thanks
 
Back
Top