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. dynamically create table row and bind database value to it

dynamically create table row and bind database value to it

Scheduled Pinned Locked Moved C#
csharpdatabasehelp
7 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.
  • R Offline
    R Offline
    reogeo2008
    wrote on last edited by
    #1

    Hi all, I wanted to create a table trhough c# code and add bind each row of it from the values from the database Pls help me...Thanks In advance Reogeo2008

    N P B 3 Replies Last reply
    0
    • R reogeo2008

      Hi all, I wanted to create a table trhough c# code and add bind each row of it from the values from the database Pls help me...Thanks In advance Reogeo2008

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      What environment? Web, Windows, Mobile?


      No comment

      R 1 Reply Last reply
      0
      • R reogeo2008

        Hi all, I wanted to create a table trhough c# code and add bind each row of it from the values from the database Pls help me...Thanks In advance Reogeo2008

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        You want to programatically create and fill a DataTable? I do that all the time. See the ExecuteSQL method in: Database Connector[^]

        1 Reply Last reply
        0
        • R reogeo2008

          Hi all, I wanted to create a table trhough c# code and add bind each row of it from the values from the database Pls help me...Thanks In advance Reogeo2008

          B Offline
          B Offline
          BobJanova
          wrote on last edited by
          #4

          What do you mean by 'bound'? If you get a DataTable through a DataAdapter (i.e. by executing a SQL query), it will come pre-filled with the correct database values, and you don't need to bind it. If you want live updating or two way binding, then you're starting to look at entity modelling frameworks, like NHibernate or whatever the new Microsoft one is – but that's massive overkill for most applications.

          P 1 Reply Last reply
          0
          • B BobJanova

            What do you mean by 'bound'? If you get a DataTable through a DataAdapter (i.e. by executing a SQL query), it will come pre-filled with the correct database values, and you don't need to bind it. If you want live updating or two way binding, then you're starting to look at entity modelling frameworks, like NHibernate or whatever the new Microsoft one is – but that's massive overkill for most applications.

            P Offline
            P Offline
            PIEBALDconsult
            wrote on last edited by
            #5

            BobJanova wrote:

            that's massive overkill for most applications

            And severe underkill for many others.

            1 Reply Last reply
            0
            • N Not Active

              What environment? Web, Windows, Mobile?


              No comment

              R Offline
              R Offline
              reogeo2008
              wrote on last edited by
              #6

              In a web application

              N 1 Reply Last reply
              0
              • R reogeo2008

                In a web application

                N Offline
                N Offline
                Not Active
                wrote on last edited by
                #7

                Its called DataBinding. Read about it.


                No comment

                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