Hi all
how can I check if a daet field in a dataset is empty before assiging it to a string variable
Hello:)
Please just use DbNull to check:
if(ds.tables[0].rows[0]["columnname"] is DbNull) { //do what you want …… }
if(!string.isnullorempty(ds.tables[0].rows[0]["columnname"].tostring()))
{
assign the value to variable
}
else
// leave it.