Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Null value

Null value

Scheduled Pinned Locked Moved Visual Basic
helpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    magedhv
    wrote on last edited by
    #1

    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 ???

    N V T 3 Replies Last reply
    0
    • M magedhv

      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 ???

      N Offline
      N Offline
      Nilesh Hapse
      wrote on last edited by
      #2

      Pls use IsDBNull

      1 Reply Last reply
      0
      • M magedhv

        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 ???

        V Offline
        V Offline
        Vimalsoft Pty Ltd
        wrote on last edited by
        #3

        Go to this Article http://www.codeproject.com/useritems/VBNET_Null_Values_in_Int.asp[^]

        Vuyiswa

        1 Reply Last reply
        0
        • M magedhv

          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 ???

          T Offline
          T Offline
          Tom Deketelaere
          wrote on last edited by
          #4

          replace your code with the following if isdbnull(f) then goto hh end if

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups