Null value
-
please help i wanna make a code that tell visual basic if the value of ("reglz")= dbnull then go to err1: when i type that ,he underline the word dbnull (u can't use it as experision here is my code
cmd.CommandText = "select sum(fatrq1)reglz from reglz where fatrname = '" + ComboBox1.Text + "'" 'fatrq1 dr = cmd.ExecuteReader dr.Read() If f = DBNull Then GoTo hh End If f = dr("reglz")
any suggestion ??? -
please help i wanna make a code that tell visual basic if the value of ("reglz")= dbnull then go to err1: when i type that ,he underline the word dbnull (u can't use it as experision here is my code
cmd.CommandText = "select sum(fatrq1)reglz from reglz where fatrname = '" + ComboBox1.Text + "'" 'fatrq1 dr = cmd.ExecuteReader dr.Read() If f = DBNull Then GoTo hh End If f = dr("reglz")
any suggestion ???Pls use IsDBNull
-
please help i wanna make a code that tell visual basic if the value of ("reglz")= dbnull then go to err1: when i type that ,he underline the word dbnull (u can't use it as experision here is my code
cmd.CommandText = "select sum(fatrq1)reglz from reglz where fatrname = '" + ComboBox1.Text + "'" 'fatrq1 dr = cmd.ExecuteReader dr.Read() If f = DBNull Then GoTo hh End If f = dr("reglz")
any suggestion ???Go to this Article http://www.codeproject.com/useritems/VBNET_Null_Values_in_Int.asp[^]
Vuyiswa
-
please help i wanna make a code that tell visual basic if the value of ("reglz")= dbnull then go to err1: when i type that ,he underline the word dbnull (u can't use it as experision here is my code
cmd.CommandText = "select sum(fatrq1)reglz from reglz where fatrname = '" + ComboBox1.Text + "'" 'fatrq1 dr = cmd.ExecuteReader dr.Read() If f = DBNull Then GoTo hh End If f = dr("reglz")
any suggestion ???replace your code with the following if isdbnull(f) then goto hh end if