Expression error

  • Thread starter Thread starter sam
  • Start date Start date
S

sam

I use this for selecting rows that match a specific case:
DataRow[] foundRows =
dSet.Tables["MY_TABLE"].Select(IIF("column1="+DBNull.Value, "column2",
"column3"));
Compiling error, because IIF is not valid in this context ?

What is the correct syntax for using IIF in a select ?
Sam
 
i haven't tried it yet....since this is a select
use a case column= ,column2 else columnxxx,end
try that
 
Back
Top