I have a simple problem that I have not been able to find an answer to despite much Googling. Perhaps posting this question up will help the next poor soul who looks for the same answer.
I have a query that returns a collection of distinct ID's.
I am creating an SQLCommand
with this query and using ExecuteScalar( )
to run it.
ExecuteScalar( )
appears to return an object and will not allow me to cast it to List.
What is the best practice to fix this and how can I fix this problem?