J
JohnE
I have the following in which I am not finding a solution. The form is a
questionnaire that has options for the user to select per question. The user
may choose not to answer a question. If that is the case then there is a
null. I am using the following 3 lines (the IF is a one liner so no end if
needed) but I get the blue squiggly under the DBNull.Value in the IF
statement. I need another pair of eyes to look at this and see what I am
missing or doing wrong.
Dim xQ1 As XPathNavigator =
root.SelectSingleNode("/my:myFields/my:Questionnaire_Section/my:Q1",
NamespaceManager)
Dim iQ1 As Int32
If xQ1.Value = "" Then iQ1 = DBNull.Value Else iQ1 =
Convert.ToInt32(xQ1.Value)
Thanks in advance to anyone who responds.
.... John
questionnaire that has options for the user to select per question. The user
may choose not to answer a question. If that is the case then there is a
null. I am using the following 3 lines (the IF is a one liner so no end if
needed) but I get the blue squiggly under the DBNull.Value in the IF
statement. I need another pair of eyes to look at this and see what I am
missing or doing wrong.
Dim xQ1 As XPathNavigator =
root.SelectSingleNode("/my:myFields/my:Questionnaire_Section/my:Q1",
NamespaceManager)
Dim iQ1 As Int32
If xQ1.Value = "" Then iQ1 = DBNull.Value Else iQ1 =
Convert.ToInt32(xQ1.Value)
Thanks in advance to anyone who responds.
.... John