loop problems/memory problem

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

    loop problems/memory problem

    I have a BIG Problem, I need to create a program that will loop 24x7 to check the database and it wouldn’t consume a lot of memory. My platform is vb6 or .net Any advise Please..
  • cugone
    New Member
    • Sep 2007
    • 20

    #2
    You could have a timer that checks the database every hour or so for new records instead of having it run constantly. (1 hour is 3,600,000 milliseconds if you need to know. :P )

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Originally posted by ewankosayo
      I have a BIG Problem, I need to create a program that will loop 24x7 to check the database and it wouldn’t consume a lot of memory. My platform is vb6 or .net Any advise Please..
      What's the problem, exactly? This sounds pretty simple to create. I'd probably recommend going with a Timer control, as the prior message suggested.

      Why should it use a lot of memory? If your table contains a huge number of records, and you keep a recordset open, this may be the case. But you only need to open a connection to the database, and then run SQL queries through that. This takes much less RAM.

      Comment

      • ewankosayo
        New Member
        • Oct 2007
        • 26

        #4
        but I need to check my database every single second.

        Comment

        • ewankosayo
          New Member
          • Oct 2007
          • 26

          #5
          why does the anti virus doesn't consume lot of memory even its active?

          Comment

          • ewankosayo
            New Member
            • Oct 2007
            • 26

            #6
            that's what i wanted to do. the looping is active but it doesn't consume a lot of memory.

            Comment

            • hariharanmca
              Top Contributor
              • Dec 2006
              • 1977

              #7
              Originally posted by ewankosayo
              but I need to check my database every single second.
              Can you explain why you want to cehck every second?

              Comment

              • ewankosayo
                New Member
                • Oct 2007
                • 26

                #8
                because of process flag. it's active and i need to check it..

                Comment

                • QVeen72
                  Recognized Expert Top Contributor
                  • Oct 2006
                  • 1445

                  #9
                  Hi,

                  What backend db are you using, and what do you need to check in the table?
                  If using Oracle/SQL Server/MySQL then, write trigger for each table for : "Insert".
                  Checking from Frontend, each table may consume lots of resources, Triggers will not consume much. Do the checking inside the trigger itself..

                  REgards
                  Veena

                  Comment

                  • ewankosayo
                    New Member
                    • Oct 2007
                    • 26

                    #10
                    i'm using visual fox pro 6.0 free table.

                    Comment

                    • QVeen72
                      Recognized Expert Top Contributor
                      • Oct 2006
                      • 1445

                      #11
                      Hi,

                      BTW, What checking do you need to do for each table/record?

                      Regards
                      Veena

                      Comment

                      • ewankosayo
                        New Member
                        • Oct 2007
                        • 26

                        #12
                        for example every time that my process flag was changed into 2 then i need to change it to 3. i can't afford to lose a second because were in a fast phase processing.

                        Comment

                        • hariharanmca
                          Top Contributor
                          • Dec 2006
                          • 1977

                          #13
                          Originally posted by ewankosayo
                          for example every time that my process flag was changed into 2 then i need to change it to 3. i can't afford to lose a second because were in a fast phase processing.
                          You know wnereever you are changing the process flag there you make an update process. Why you are doing each and every second. That will slowdown your process.

                          Comment

                          • QVeen72
                            Recognized Expert Top Contributor
                            • Oct 2006
                            • 1445

                            #14
                            Hi,

                            Where is the Process Flag..?
                            A Field in one table or in Many Tables..?

                            REgards
                            Veena

                            Comment

                            • ewankosayo
                              New Member
                              • Oct 2007
                              • 26

                              #15
                              i'm not the one who's changing the data of my processflag its the other system that i created.

                              Comment

                              Working...