KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How can I check for a NULL value in an open MySqlDataReader ? The following doesn't work; it's always hitting the else : if (rdr.GetString("timeOut") == null) { queryResult.Egresstime = "Logged in"; } else { queryResult.Egresstime = rdr.GetString("timeOut"); } rdr.IsDbNull(int i) only accepts a column number, not name.
Tags (comma-separated)
Save Edits
Cancel