Memory Issues in VB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • daniel aristidou
    Contributor
    • Aug 2007
    • 494

    #16
    I tend to find that msflexigrid vb6 version is rather difficult and slow to use.,,,,,,,,
    Why not try using listbox?

    Comment

    • daniel aristidou
      Contributor
      • Aug 2007
      • 494

      #17
      Originally posted by daniel aristidou
      I tend to find that msflexigrid vb6 version is rather difficult and slow to use.,,,,,,,,
      Why not try using listbox?
      Sorry meant to say mshflexgrid

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #18
        Originally posted by daniel aristidou
        Why not try using listbox?
        What if he wants to display 20 columns...?

        Regards
        Veena

        Comment

        • daniel aristidou
          Contributor
          • Aug 2007
          • 494

          #19
          Originally posted by QVeen72
          What if he wants to display 20 columns...?
          See your point.....

          General Question....Why is vb6 still being used for large databases when ..newer versions offer so much more.....freedo m and control?

          New versions of vb have built in code converters to update your code from old coding versions to new coding versions.
          So if its a case of converting it being a very long task...i wouldnt think it would take that long....also it will probably solve alot of problems that can be experience in older coding formats.
          I suppose it might be time consuming to learn the new syntax though.

          Daniel(~_~)

          Comment

          • Killer42
            Recognized Expert Expert
            • Oct 2006
            • 8429

            #20
            That's a large part of my problem. No time to learn the new setup and syntax. In VB6, at least I "know my way around".

            Of course, I'm using it pretty much as a hobby, so it's a fairly minor issue.

            Also, I think that most things can be done in VB6, just as well as (if not better than) in later versions. MS tend to add on lots of bells and whistles that don't make a real difference. I'll bet the later versions execute slower.

            Comment

            • QVeen72
              Recognized Expert Top Contributor
              • Oct 2006
              • 1445

              #21
              Originally posted by daniel aristidou
              General Question....Why is vb6 still being used for large databases when ..newer versions offer so much more.....freedo m and control?
              as MS itself says, If you are starting a new project, start in VB.net, but upgrading the older one may not be a very good option..

              Originally posted by daniel aristidou
              New versions of vb have built in code converters to update your code from old coding versions to new coding versions.
              Yeah, I once tried to convert our live Project.. with some 100 forms, it took 3 hours and throwed up at least 1000 errors. Printing a text on form has different approach all together(likewi se many are ther).. all that code was not converted...
              And if an Older version is running quite OK, I would not want to take the pain of upgrading it.. Say if you have to update it in a LAN of 100 Client nodes..

              It is better to start on Latest Version for new Projects..

              Regards
              Veena

              Comment

              • daniel aristidou
                Contributor
                • Aug 2007
                • 494

                #22
                Originally posted by Killer42
                I'll bet the later versions execute slower.
                It obviously depends on what you want to do....... but i would take that bet..
                Also
                Originally posted by Killer42
                MS tend to add on lots of bells and whistles that don't make a real difference.
                I find that alot of the new "Bells and Whistles" reduce alot of work/code needed to be written, therefore i would have thought that this would reduce execute time due to less code needed to do a task.

                Daniel(~_~)

                Comment

                • QVeen72
                  Recognized Expert Top Contributor
                  • Oct 2006
                  • 1445

                  #23
                  Originally posted by daniel aristidou
                  I find that alot of the new "Bells and Whistles" reduce alot of work/code needed to be written, therefore i would have thought that this would reduce execute time due to less code needed to do a task.
                  Daniel(~_~)
                  Not always the code is reduced..
                  I tried this..
                  [code=vb6]
                  Me.Cls
                  Me.Print "Code In Vb6"
                  Me.Print "Just 3 Lines of Code"
                  [/code]

                  I tried this in vb.net and this is what I end with...:
                  [code=vbnet]
                  Dim MyCanvas As Graphics = Me.CreateGraphi cs()
                  Dim myFont As Font = New Font("CourierNe w", 12)
                  Dim LineHeight As Integer = myFont.Height
                  Dim LineNo As Integer
                  LineNo = 0
                  MyCanvas.DrawSt ring("Welcome To VB.Net Graphics", myFont, Brushes.AliceBl ue, 1, (LineNo * LineHeight))
                  LineNo += 1
                  MyCanvas.DrawSt ring("This Is a REAL TEDIOUS PROCESS ", myFont, Brushes.AliceBl ue, 1, (LineNo * LineHeight))
                  [/code]

                  Regards
                  Veena

                  Comment

                  • daniel aristidou
                    Contributor
                    • Aug 2007
                    • 494

                    #24
                    Yes printing is alot more code, however you can do alot more.

                    Comment

                    • Killer42
                      Recognized Expert Expert
                      • Oct 2006
                      • 8429

                      #25
                      Originally posted by daniel aristidou
                      I find that alot of the new "Bells and Whistles" reduce alot of work/code needed to be written, therefore i would have thought that this would reduce execute time due to less code needed to do a task.
                      I have always found that in general, it works the other way. As code libraries and so on become more and more bloated with things to make life easier for the programmer, things tend to take longer to load and longer to execute.

                      In fact, finding that handy new function that saves you coding a complex piece of code everywhere can make things slightly slower - because you may perform exactly the same code as before, but you introduce an extra function call to do it. If you are performing the function enough millions of times, the difference can become significant.

                      Of course this general tendency won't apply in all situations. And it doesn't mean we should all be using VB1. But there are sometimes cases where an older and simpler tool may be better, because it's simpler.
                      Last edited by Killer42; Jan 21 '08, 12:03 AM.

                      Comment

                      • vikas000000a
                        New Member
                        • Jan 2008
                        • 46

                        #26
                        Originally posted by Killer42
                        Just wondering, has there been any progress on this problem?
                        Hi Killer,

                        Sorry for the delay in reply. Actually I was on leave for seven days.

                        I have got the solution to my problem. The solution was to make my recordset as ForwardOnly. That way, it didn't bother to store the scanned records in memory and my problem was that only, excessive use of RAM.

                        Now, I am able to scan about 20-30 million records at once. Although, my requirement was upto 50-60 million, but I was somehow able to convince my client that this is the limit under the given circumstances.

                        Clarification
                        I would like to tell you and other fellows that I never dared to put 50-60 million records in an MSHFlexGrid. All I wanted was to put a summarized position in the grid which consists no more than 15 rows. It was something like this:

                        [HTML]Product Balance Number of entries
                        eRemit 41210152536.01 78459321
                        eATM 871475865.28 459863251
                        ............ ............... .... ............... ....
                        ............ ............... .... ............... ....
                        Maestro Card 4789652123.01 458763218[/HTML]


                        I think, I had made this quite clear in my very first post while asking the question. I don't know why this confusion arose.

                        Anyways, I am happy that my problem is solved now.
                        Thanks for all your support and suggestions.

                        Keep Programming

                        Comment

                        • Killer42
                          Recognized Expert Expert
                          • Oct 2006
                          • 8429

                          #27
                          Originally posted by vikas000000a
                          I have got the solution to my problem. The solution was to make my recordset as ForwardOnly. That way, it didn't bother to store the scanned records in memory and my problem was that only, excessive use of RAM.
                          This will certainly be worth keeping in mind. I for one have always wondered what forward-only recordsets were good for. Thanks for the info.

                          Originally posted by vikas000000a
                          ...I think, I had made this quite clear in my very first post while asking the question. I don't know why this confusion arose.
                          That's easy. You made the fatal mistake of assuming we would read it. :D (And understand it.)

                          Seriously though, when dealing with people via text like this, it's very easy for misunderstandin gs to creep in. You just can't beat face-to-face communication.

                          Originally posted by vikas000000a
                          Anyways, I am happy that my problem is solved now.
                          Excellent! Glad to hear it.


                          P.S. Man, I wish that was my balance...

                          Comment

                          • vikas000000a
                            New Member
                            • Jan 2008
                            • 46

                            #28
                            Hi Killer,

                            Agreed that I cann't beat face-to-face communication, but a careful reading of my question will easily reveal you what my intentions were. Its not that complex as it is being projected.

                            P.S. Man, I wish that was my balance...
                            But I certainly do not wish that it was you balance. Because it is a debit balance meaning that my bank has lent that much amount to people and is required to recover that. Still, if you want that to be your balance, I cann't help it. My bank's job will get easier.

                            Never mind, jokes apart.

                            Comment

                            • Killer42
                              Recognized Expert Expert
                              • Oct 2006
                              • 8429

                              #29
                              Originally posted by vikas000000a
                              Agreed that I cann't beat face-to-face communication, but a careful reading of my question will easily reveal you what my intentions were. Its not that complex as it is being projected.
                              Oops!

                              Originally posted by vikas000000a
                              But I certainly do not wish that it was you balance. Because it is a debit balance ...
                              Oops!

                              :)

                              Comment

                              Working...