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. Database & SysAdmin
  3. Database
  4. How to display message when record is not found?

How to display message when record is not found?

Scheduled Pinned Locked Moved Database
databasehelptutorialquestion
5 Posts 3 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.
  • D Offline
    D Offline
    DotNet
    wrote on last edited by
    #1

    How to display message when the process cannot find the record in the database? I'm using SQL database. Please help. Thanks.

    C 1 Reply Last reply
    0
    • D DotNet

      How to display message when the process cannot find the record in the database? I'm using SQL database. Please help. Thanks.

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      DotNet wrote: How to display message when the process cannot find the record in the database? That depends on what technology you are using. What is accessing you SQL Server? Or do you just want a message to appear in the Query Analyser?


      "If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!

      D 1 Reply Last reply
      0
      • C Colin Angus Mackay

        DotNet wrote: How to display message when the process cannot find the record in the database? That depends on what technology you are using. What is accessing you SQL Server? Or do you just want a message to appear in the Query Analyser?


        "If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!

        D Offline
        D Offline
        DotNet
        wrote on last edited by
        #3

        Just a simple datagrid and textbox and search button. When you enter ID in the textbox, if the ID is not in the table, then a label1.visible = true or a prompt message will pop-up. How to write the condition part when the datagrid is blanked (no data)?

        S 1 Reply Last reply
        0
        • D DotNet

          Just a simple datagrid and textbox and search button. When you enter ID in the textbox, if the ID is not in the table, then a label1.visible = true or a prompt message will pop-up. How to write the condition part when the datagrid is blanked (no data)?

          S Offline
          S Offline
          Steven Campbell
          wrote on last edited by
          #4

          label1.Visible = (myGrid.Items.Count > 0);, called sometime after the DataBind().


          my blog

          D 1 Reply Last reply
          0
          • S Steven Campbell

            label1.Visible = (myGrid.Items.Count > 0);, called sometime after the DataBind().


            my blog

            D Offline
            D Offline
            DotNet
            wrote on last edited by
            #5

            How can I counter check it when I enter some ID, let's say, ID - P0002 is not in the database. So the datagrid will invisible. Then, label1.visible = true. The initial part, I don't understand. Please help.

            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