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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top