Author: janwane | Posted on: 9/7/2010 11:15:42 AM | Views : 392

 I use the following code to read SqlDataSource in my code-behind:
DataView dv = (DataView)SDS_CkForDups.Select(DataSourceSelectArguments.Empty); 99% of the time I know that dv will exist and will have records.  This time my SqlDataSource exists for the sole purpose of checking if record already exists before insert to prevent dups so I must allow for the result of the above operation to be null.  One cannot use "if (dv.Count > 0)" because dv doesn't exist.  I see other posts where in VB there is evidently a method named "IsDBnull".  What is the best way to determine if the result of the query is null?  Thank you.
...

Go to the complete details ...