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. C#
  4. How You Check Data In DataSet?

How You Check Data In DataSet?

Scheduled Pinned Locked Moved C#
databasequestion
7 Posts 5 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.
  • N Offline
    N Offline
    noamtzu
    wrote on last edited by
    #1

    Hello, I have a SQL query,and i want to check if i get a information from the query,BUT not to show the result for user. I'm using on DataSet/DataTable. Someone know how i do that? thanks.

    D 1 Reply Last reply
    0
    • N noamtzu

      Hello, I have a SQL query,and i want to check if i get a information from the query,BUT not to show the result for user. I'm using on DataSet/DataTable. Someone know how i do that? thanks.

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      If the dataset has tables with rows, then your query returned some values from database. You can check this right after you execute the SQL command.

      जय हिंद

      N 1 Reply Last reply
      0
      • D dan sh

        If the dataset has tables with rows, then your query returned some values from database. You can check this right after you execute the SQL command.

        जय हिंद

        N Offline
        N Offline
        noamtzu
        wrote on last edited by
        #3

        Like This? That not work. int CheckValue=da.Fill(ds); if (CheckValue ==0) { cb1.Checked = false; } else { cb1.Checked = true; }

        C 1 Reply Last reply
        0
        • N noamtzu

          Like This? That not work. int CheckValue=da.Fill(ds); if (CheckValue ==0) { cb1.Checked = false; } else { cb1.Checked = true; }

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Wow. Read the documentation instead of wildly guessing. You can call ExecuteNonQuery if you wrote your own SQL code, and if your SQL returns a single result.

          Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

          N R 2 Replies Last reply
          0
          • C Christian Graus

            Wow. Read the documentation instead of wildly guessing. You can call ExecuteNonQuery if you wrote your own SQL code, and if your SQL returns a single result.

            Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

            N Offline
            N Offline
            noamtzu
            wrote on last edited by
            #5

            I cant not. Giva example if you cant. thanks.

            1 Reply Last reply
            0
            • C Christian Graus

              Wow. Read the documentation instead of wildly guessing. You can call ExecuteNonQuery if you wrote your own SQL code, and if your SQL returns a single result.

              Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

              R Offline
              R Offline
              Rajesh R Subramanian
              wrote on last edited by
              #6

              You saw that reply? He cannot read the docs. How possibly can you deal with an idiot of this order?! Morons like this are the reason why I asked Chris to appoint a moderator or two for each forum. I've voted to remove his message. I'll remember never ever to attempt to help him.

              It is a crappy thing, but it's life -^ Carlo Pallini

              L 1 Reply Last reply
              0
              • R Rajesh R Subramanian

                You saw that reply? He cannot read the docs. How possibly can you deal with an idiot of this order?! Morons like this are the reason why I asked Chris to appoint a moderator or two for each forum. I've voted to remove his message. I'll remember never ever to attempt to help him.

                It is a crappy thing, but it's life -^ Carlo Pallini

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                <sarcasm> With respects sir, he clearly said "cant not", which is a double negative. That clearly means he can. Some people... </sarcasm>

                Check out the CodeProject forum Guidelines[^] The original soapbox 1.0 is back![^]

                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