loop problems/memory problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ewankosayo
    New Member
    • Oct 2007
    • 26

    #16
    processflag came in a one table..

    Comment

    • QVeen72
      Recognized Expert Top Contributor
      • Oct 2006
      • 1445

      #17
      Hi,

      Somehow, still not very convinced on what you are wanting to do.
      Can you give the table structure for which you need to check? And what table/field you need to change/update?
      Is the change always linear? Like if it changes to 2, you want to make it 3 (as you said in your earlier post)? 3 to 4 and so on. Or is there some other logic for that?
      Explain the problem in detail..

      Regards
      Veena

      Comment

      • hariharanmca
        Top Contributor
        • Dec 2006
        • 1977

        #18
        I know your system is an multi user system.
        No problem, There also you are the one updating the flag (Look, the flag will not update itself! you have to update, like flage=1 etc..,)
        So whereever you are giving flag= somthing there you have to do your process.

        Comment

        • ewankosayo
          New Member
          • Oct 2007
          • 26

          #19
          yes its a multi user system.

          Comment

          • ewankosayo
            New Member
            • Oct 2007
            • 26

            #20
            Is the change always linear? No.

            I need to check and change the field processflag, for example the processflag is number 2 then I’ll change it to number 3 for the last update. The problem is the memory every time I use a loop it will consume a memory my system will runs 24hours a day.

            Comment

            • hariharanmca
              Top Contributor
              • Dec 2006
              • 1977

              #21
              Can you post what you had tried.

              Comment

              • Killer42
                Recognized Expert Expert
                • Oct 2006
                • 8429

                #22
                This thread is sure stretching out longer than I expected.

                You should be able to just...
                • Create an ADO connection to your database.
                • Set up a timer to fire every second (or perhaps every half-second).
                • When it fires, do your database logic.

                What's the problem?

                Comment

                • ewankosayo
                  New Member
                  • Oct 2007
                  • 26

                  #23
                  it wont consume a lot of memory when i do that. because my system will runs 24hours a day...

                  Comment

                  • cugone
                    New Member
                    • Sep 2007
                    • 20

                    #24
                    Originally posted by ewankosayo
                    it wont consume a lot of memory when i do that. because my system will runs 24hours a day...
                    Set it up as a Windows Service and it will run in the background.

                    Comment

                    • Killer42
                      Recognized Expert Expert
                      • Oct 2006
                      • 8429

                      #25
                      Originally posted by ewankosayo
                      it wont consume a lot of memory when i do that. because my system will runs 24hours a day...
                      I'd say your best bet is to give it a shot, and see what happens. The term "a lot of memory" could mean anything. A few years ago, I had a machine which was fantastic, because it had a whole 4MB of RAM. Was that "a lot"? It sure was, at the time.

                      So how much is "a lot" for your situation? Like I said, give it a go and see.

                      I recently had an application which used about 1.2GB of RAM by opening some big ADO recordsets. When I got rid of the recordsets and started just running commands through the ADO connection, it reduced by something between 700 and 900MB. (The fact that it still uses hundreds of MB is unrelated - it has some enormous arrays).

                      Comment

                      Working...