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. Visual Basic
  4. why I lose data after chnage the code or add code

why I lose data after chnage the code or add code

Scheduled Pinned Locked Moved Visual Basic
questioncsharpdatabasevisual-studio
14 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 romo22

    well that what happen to me every time I create SQL table and after save some record like add rows full with information it will be saved and fine but once I change any code or for example create new button on the form the data on the GridviewData will disappear I am not sure if that because I have to change something on the Proprieties

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

    romo22 wrote:

    I have to change something on the Proprieties

    I would have to say no.... the things that you are describing is not possible. If your data was saved then it was saved. You are possibly creating a transaction and not committing. More likely you are clearing the table somewhere in your code. Adding a button to your project will not magically make data in a database just disappear.

    Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

    1 Reply Last reply
    0
    • L Lost User

      Probably those crazy things he mentioned.

      Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness

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

      Richard MacCutchan wrote:

      crazy things

      Yeah probably. I would not be able to guess which one, out of the 4 or 5 billion crazy things that it could be, is causing the problem

      Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

      1 Reply Last reply
      0
      • R romo22

        Hi guys I have very big question I have a project on Visual Studio, this project include table SQL data. I notice when I add records or add rows with information . imagine that I add more than 1000 rows full with a lot of names and number. the crazy thing that all these data will be removed once I change a little code or add. I wonder how can I protect my data even I make change code time to time.

        P Offline
        P Offline
        phil o
        wrote on last edited by
        #7

        Trying to guess what is going on from what you told us is quite tough... What could happen is that you have your database as a .sdf or .mdb file ; when you change your code, and recompile, the datafile is copied to the output directory. So when you recompile, you overwrite the datafile in the output directory of your projet (the datafile that your application is actually using). But it's just a guess. Unfortunately I lost my crystal ball :)

        ...No memory stick has been harmed during establishment of this signature.

        R 1 Reply Last reply
        0
        • P phil o

          Trying to guess what is going on from what you told us is quite tough... What could happen is that you have your database as a .sdf or .mdb file ; when you change your code, and recompile, the datafile is copied to the output directory. So when you recompile, you overwrite the datafile in the output directory of your projet (the datafile that your application is actually using). But it's just a guess. Unfortunately I lost my crystal ball :)

          ...No memory stick has been harmed during establishment of this signature.

          R Offline
          R Offline
          romo22
          wrote on last edited by
          #8

          thanks guys for helping me I did something to make my question clear watch this YouTube you can see my question please watch with full screen http://www.youtube.com/watch?v=jDj_ZD10y0k&feature=youtu.be[^] thanks guys

          L R 2 Replies Last reply
          0
          • R romo22

            thanks guys for helping me I did something to make my question clear watch this YouTube you can see my question please watch with full screen http://www.youtube.com/watch?v=jDj_ZD10y0k&feature=youtu.be[^] thanks guys

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

            Please don't expect people to go to other sites to try and understand your question. Explain clearly what your problem is, showing code extracts where necessary, and show what results you expect and what you get.

            Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness

            M R 2 Replies Last reply
            0
            • L Lost User

              Please don't expect people to go to other sites to try and understand your question. Explain clearly what your problem is, showing code extracts where necessary, and show what results you expect and what you get.

              Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness

              M Offline
              M Offline
              Midnight Ahri
              wrote on last edited by
              #10

              you don't even tell us your billion data gone from database or dataset.. X|

              L 1 Reply Last reply
              0
              • M Midnight Ahri

                you don't even tell us your billion data gone from database or dataset.. X|

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

                Why are you telling me this?

                Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness

                1 Reply Last reply
                0
                • L Lost User

                  Please don't expect people to go to other sites to try and understand your question. Explain clearly what your problem is, showing code extracts where necessary, and show what results you expect and what you get.

                  Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness

                  R Offline
                  R Offline
                  romo22
                  wrote on last edited by
                  #12

                  sometimes words leads you to understand different thing or doesn't make sense for you . reading my words not enough to understand my problem because my English not good enough to express what I need to say it. I speak different language, I don't even understand what database means on my language I just understand what database do. we spent a lot of times chat to each other write to each other youtube that I did will save our time please watch you will not lose anything you are here because you need to help me, http://www.youtube.com/watch?v=jDj_ZD10y0k[^]

                  L 1 Reply Last reply
                  0
                  • R romo22

                    sometimes words leads you to understand different thing or doesn't make sense for you . reading my words not enough to understand my problem because my English not good enough to express what I need to say it. I speak different language, I don't even understand what database means on my language I just understand what database do. we spent a lot of times chat to each other write to each other youtube that I did will save our time please watch you will not lose anything you are here because you need to help me, http://www.youtube.com/watch?v=jDj_ZD10y0k[^]

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

                    romo22 wrote:

                    English not good enough

                    I fully appreciate that English is not your native language. Nothing is stopping you from using Google translate to translate your native language into English and then posting that here.

                    Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                    1 Reply Last reply
                    0
                    • R romo22

                      thanks guys for helping me I did something to make my question clear watch this YouTube you can see my question please watch with full screen http://www.youtube.com/watch?v=jDj_ZD10y0k&feature=youtu.be[^] thanks guys

                      R Offline
                      R Offline
                      RobCroll
                      wrote on last edited by
                      #14

                      Did you research philo's answer? Did flagging the database not to compile fix the problem? Maybe try that first. If you run the app, stop and then rerun, outside of your IDE and the data is still lost, then you are not saving the data. You need to save the data.

                      "You get that on the big jobs."

                      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