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. count of rows in datarow

count of rows in datarow

Scheduled Pinned Locked Moved Visual Basic
question
4 Posts 2 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.
  • S Offline
    S Offline
    SamRST
    wrote on last edited by
    #1

    hi frnds.. i have a function that return a DATAROW , in another , i want to check that datarow has any values ie any row, or its nothing.. how can i.. cheers... :doh:

    C 1 Reply Last reply
    0
    • S SamRST

      hi frnds.. i have a function that return a DATAROW , in another , i want to check that datarow has any values ie any row, or its nothing.. how can i.. cheers... :doh:

      C Offline
      C Offline
      ctlqt12
      wrote on last edited by
      #2

      Hello, You can try this : Dim dr() As DataRow dr = ds.Tables(0).Select("id > 'o'") 'ds is a DataSet If (dr.GetLenght(0) = 0) then 'Has no row Else 'Has row End if

      S 1 Reply Last reply
      0
      • C ctlqt12

        Hello, You can try this : Dim dr() As DataRow dr = ds.Tables(0).Select("id > 'o'") 'ds is a DataSet If (dr.GetLenght(0) = 0) then 'Has no row Else 'Has row End if

        S Offline
        S Offline
        SamRST
        wrote on last edited by
        #3

        but i'm sending only 1 row and not recieving an array ..

        C 1 Reply Last reply
        0
        • S SamRST

          but i'm sending only 1 row and not recieving an array ..

          C Offline
          C Offline
          ctlqt12
          wrote on last edited by
          #4

          Hello, you can try this If dr Is Nothing Then ' dr is DataRow MessageBox.Show("Row has no value") Else MessageBox.Show("Row has value") 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