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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. data adapter: error meassage

data adapter: error meassage

Scheduled Pinned Locked Moved ASP.NET
databasehelptutorial
7 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.
  • K Offline
    K Offline
    komalcse
    wrote on last edited by
    #1

    i have binded the records from the database and its working, but i have written a query to sum a column and display in different column, so totally 2 tables should be binded, i have binded using 'foreach' i don't know how to get the error message

    _ 1 Reply Last reply
    0
    • K komalcse

      i have binded the records from the database and its working, but i have written a query to sum a column and display in different column, so totally 2 tables should be binded, i have binded using 'foreach' i don't know how to get the error message

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      komalcse wrote:

      but i have written a query to sum a column and display in different column, so totally 2 tables should be binded, i have binded using 'foreach'

      Bind to what?

      Apurva Kaushal

      K 1 Reply Last reply
      0
      • _ _AK_

        komalcse wrote:

        but i have written a query to sum a column and display in different column, so totally 2 tables should be binded, i have binded using 'foreach'

        Bind to what?

        Apurva Kaushal

        K Offline
        K Offline
        komalcse
        wrote on last edited by
        #3

        Hi, i have 2 tables in my database ihave used text boxes in My code behind to display it.(asp.net and c# with sql) i have given sql connection using data adapter and dataset i can view the datas from the database my doubt is how can i show the error message if there is no information in the database

        _ 1 Reply Last reply
        0
        • K komalcse

          Hi, i have 2 tables in my database ihave used text boxes in My code behind to display it.(asp.net and c# with sql) i have given sql connection using data adapter and dataset i can view the datas from the database my doubt is how can i show the error message if there is no information in the database

          _ Offline
          _ Offline
          _AK_
          wrote on last edited by
          #4

          If you are using dataset then you can check the rows.count property. If it is returning 0 then there is no records in the database.

          Apurva Kaushal

          K 1 Reply Last reply
          0
          • _ _AK_

            If you are using dataset then you can check the rows.count property. If it is returning 0 then there is no records in the database.

            Apurva Kaushal

            K Offline
            K Offline
            komalcse
            wrote on last edited by
            #5

            yes its works Thanks a lot but i have another question now i have two tables in my database, am not using the gridview to display the information am using textbox, how can i display the error message now i have used, DataTable dt = ds.Tables[0]; foreach (DataRow dr in dt.Rows) and DataTable dt = ds.Tables[1]; foreach (DataRow dr in dt.Rows) how to display the message

            _ 1 Reply Last reply
            0
            • K komalcse

              yes its works Thanks a lot but i have another question now i have two tables in my database, am not using the gridview to display the information am using textbox, how can i display the error message now i have used, DataTable dt = ds.Tables[0]; foreach (DataRow dr in dt.Rows) and DataTable dt = ds.Tables[1]; foreach (DataRow dr in dt.Rows) how to display the message

              _ Offline
              _ Offline
              _AK_
              wrote on last edited by
              #6

              Here you have to check the count of records for bot the datatables separately and display the message accordingly.

              Apurva Kaushal

              K 1 Reply Last reply
              0
              • _ _AK_

                Here you have to check the count of records for bot the datatables separately and display the message accordingly.

                Apurva Kaushal

                K Offline
                K Offline
                komalcse
                wrote on last edited by
                #7

                Let me repeat my question: 2 tables from the database should be binded to my textboxes separately can u explain me wit an example so that i can undersatnd better plz thanks, komal

                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