Are you testing for a character with a scalar value of zero, or a null value
in a database column? If you want to test the value of characters, use the
string.Chars property. If you want to test if a column has a null value,
check if the value has a type of DBNull. If you're using a data reader, use
the IsDBNull method:
if(reader.Read())
{
int n = reader.IsDBNull(0)? 0: reader.GetInt32(0);
...
}
--
Mickey Williams
Author, "Microsoft Visual C# .NET Core Reference", MS Press
www.servergeek.com
"Steve Caliendo" <sc*******@epion.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
How do I test for null characters from a database query ??
Thanks,
Steve