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. General Programming
  3. C#
  4. Why SqlCommandBuilder

Why SqlCommandBuilder

Scheduled Pinned Locked Moved C#
databasequestionannouncement
10 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.
  • K Offline
    K Offline
    Krishna Varadharajan
    wrote on last edited by
    #1

    Hi, I know the functionality of sqlcommandBuilder. But when to use sqlcommandbuilder instant of sql query. If sqlcommandBuilder does everything( insert/update/delete ), than why I required sql query's. I can do everything through sqlcommandBuilder rite. Is there any particular sinario that i can use sqlcommandBuilder or I cant use sqlcommandBuilder ? krishna

    L P 2 Replies Last reply
    0
    • K Krishna Varadharajan

      Hi, I know the functionality of sqlcommandBuilder. But when to use sqlcommandbuilder instant of sql query. If sqlcommandBuilder does everything( insert/update/delete ), than why I required sql query's. I can do everything through sqlcommandBuilder rite. Is there any particular sinario that i can use sqlcommandBuilder or I cant use sqlcommandBuilder ? krishna

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

      krishnavaradharajan wrote:

      If sqlcommandBuilder does everything( insert/update/delete ), than why I required sql query's.

      It doesn't do "everything", just the crud-operations. It's not used when creating a table using a query, or when things get complex. As the documentation states, it only generates a single-table update.

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

      K 1 Reply Last reply
      0
      • L Lost User

        krishnavaradharajan wrote:

        If sqlcommandBuilder does everything( insert/update/delete ), than why I required sql query's.

        It doesn't do "everything", just the crud-operations. It's not used when creating a table using a query, or when things get complex. As the documentation states, it only generates a single-table update.

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

        K Offline
        K Offline
        Krishna Varadharajan
        wrote on last edited by
        #3

        Hi Mr.Eddy, So you mean to say that, commanbuilder can be used only for simple and single query operation. Another thing is, consider I have a dataset(ds) of 1000 records, and how do I edit dataset, means how to update without using commanbuilder and fetch only updated rows from ds. krishna

        L 1 Reply Last reply
        0
        • K Krishna Varadharajan

          Hi, I know the functionality of sqlcommandBuilder. But when to use sqlcommandbuilder instant of sql query. If sqlcommandBuilder does everything( insert/update/delete ), than why I required sql query's. I can do everything through sqlcommandBuilder rite. Is there any particular sinario that i can use sqlcommandBuilder or I cant use sqlcommandBuilder ? krishna

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

          krishnavaradharajan wrote:

          when to use sqlcommandbuilder

          Never.

          K 1 Reply Last reply
          0
          • P PIEBALDconsult

            krishnavaradharajan wrote:

            when to use sqlcommandbuilder

            Never.

            K Offline
            K Offline
            Krishna Varadharajan
            wrote on last edited by
            #5

            Do you have any particular reason to say never.. krishna

            P 1 Reply Last reply
            0
            • K Krishna Varadharajan

              Hi Mr.Eddy, So you mean to say that, commanbuilder can be used only for simple and single query operation. Another thing is, consider I have a dataset(ds) of 1000 records, and how do I edit dataset, means how to update without using commanbuilder and fetch only updated rows from ds. krishna

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

              krishnavaradharajan wrote:

              So you mean to say that, commanbuilder can be used only for simple and single query operation.

              Yup. It's a shortcut, an easy way to generate a simple query.

              krishnavaradharajan wrote:

              Another thing is, consider I have a dataset(ds) of 1000 records, and how do I edit dataset, means how to update without using commanbuilder and fetch only updated rows from ds.

              The GetChanges method will give you everything that changed in the dataset.

              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

              K 1 Reply Last reply
              0
              • K Krishna Varadharajan

                Do you have any particular reason to say never.. krishna

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

                Experience. It has always bitten me with its limitations. Plus it's closely associated with DataAdapter which is even worse.

                K 1 Reply Last reply
                0
                • L Lost User

                  krishnavaradharajan wrote:

                  So you mean to say that, commanbuilder can be used only for simple and single query operation.

                  Yup. It's a shortcut, an easy way to generate a simple query.

                  krishnavaradharajan wrote:

                  Another thing is, consider I have a dataset(ds) of 1000 records, and how do I edit dataset, means how to update without using commanbuilder and fetch only updated rows from ds.

                  The GetChanges method will give you everything that changed in the dataset.

                  Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                  K Offline
                  K Offline
                  Krishna Varadharajan
                  wrote on last edited by
                  #8

                  Thank you... krishna

                  L 1 Reply Last reply
                  0
                  • P PIEBALDconsult

                    Experience. It has always bitten me with its limitations. Plus it's closely associated with DataAdapter which is even worse.

                    K Offline
                    K Offline
                    Krishna Varadharajan
                    wrote on last edited by
                    #9

                    Thank you.. :) krishna

                    1 Reply Last reply
                    0
                    • K Krishna Varadharajan

                      Thank you... krishna

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

                      You're welcome :)

                      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