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. Data Bindings

Data Bindings

Scheduled Pinned Locked Moved Database
wpfwcfhelpannouncement
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.
  • R Offline
    R Offline
    Rharzkie
    wrote on last edited by
    #1

    Instead of updating in usual way, i use a simple binding for my data entry. It works but my problem is the last record that i recorded did not update. Only the previous records are updated, but the last did not. my code for 'update' button is: Me.BindingContext(DataSet21).EndCurrentEdit() Me.OleDbDataAdapter2.Update(DataSet21) MsgBox("Grade recorded!")

    C 1 Reply Last reply
    0
    • R Rharzkie

      Instead of updating in usual way, i use a simple binding for my data entry. It works but my problem is the last record that i recorded did not update. Only the previous records are updated, but the last did not. my code for 'update' button is: Me.BindingContext(DataSet21).EndCurrentEdit() Me.OleDbDataAdapter2.Update(DataSet21) MsgBox("Grade recorded!")

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

      Rharzkie wrote:

      DataSet21

      Rharzkie wrote:

      OleDbDataAdapter2

      Wow! Have you ever thought of actually giving your variables descriptive names? What does DataSet21 mean to anyone anyway?


      Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website

      M R 2 Replies Last reply
      0
      • C Colin Angus Mackay

        Rharzkie wrote:

        DataSet21

        Rharzkie wrote:

        OleDbDataAdapter2

        Wow! Have you ever thought of actually giving your variables descriptive names? What does DataSet21 mean to anyone anyway?


        Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website

        M Offline
        M Offline
        Mike Dimmick
        wrote on last edited by
        #3

        It's the result of dropping data access components onto the form designer, which I would go as far as to call worst practice.

        Stability. What an interesting concept. -- Chris Maunder

        O 1 Reply Last reply
        0
        • M Mike Dimmick

          It's the result of dropping data access components onto the form designer, which I would go as far as to call worst practice.

          Stability. What an interesting concept. -- Chris Maunder

          O Offline
          O Offline
          originSH
          wrote on last edited by
          #4

          You can still edit the properties and give it a decent name without ever having to go near the code. Whilst I agree that the drag n drop data components are evil, thier use is no excuse for bad naming ;)

          1 Reply Last reply
          0
          • C Colin Angus Mackay

            Rharzkie wrote:

            DataSet21

            Rharzkie wrote:

            OleDbDataAdapter2

            Wow! Have you ever thought of actually giving your variables descriptive names? What does DataSet21 mean to anyone anyway?


            Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website

            R Offline
            R Offline
            Rharzkie
            wrote on last edited by
            #5

            Just answer my question ok.. To run your program properly and to write the correct codes are more important that giving a descriptive name. I can run my program properly even though i did not change the name of my variables...

            C P 2 Replies Last reply
            0
            • R Rharzkie

              Just answer my question ok.. To run your program properly and to write the correct codes are more important that giving a descriptive name. I can run my program properly even though i did not change the name of my variables...

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

              Rharzkie wrote:

              To run your program properly and to write the correct codes are more important that giving a descriptive name

              I beg to differ - If you wrote this mess in the company I work for no-one would be happy with you. If you wrote this, then disappeared off (or got yourself fired - which, if you are writing code in this way, would be quite likely) and someone else had to maintain it, they would definitely be very unhappy with you.


              Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website

              1 Reply Last reply
              0
              • R Rharzkie

                Just answer my question ok.. To run your program properly and to write the correct codes are more important that giving a descriptive name. I can run my program properly even though i did not change the name of my variables...

                P Offline
                P Offline
                Pete OHanlon
                wrote on last edited by
                #7

                But giving things descriptive names is part of good programming practice. It is never acceptable to leave something in place that cannot be easily identified at a later stage. The important thing to remember here is that it only takes you a couple of seconds to rename them before there is any code present, but as soon as you have code that refers to it, you have to take much more care and this takes time.

                Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.

                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