[Gambas-user] when i used collections on my code, gambas get hangs!

Jorge Carrión shordi at ...626...
Thu May 25 11:40:00 CEST 2017


Try

Public Procedure AddList()
  Dim ListQurey As String
  Dim Lresult As Result

  ListQurey = "SELECT name FROM name_tbl"
  Lresult = MODMain.MyConn.Exec(ListQurey)
  'If Lresult.Count > 0 Then
  '*  Do While Not Eof(Lresult)*
  while Lresult.available
      ListBox1.Add(Lresult!"name")
      Lresult.MoveNext
  wend
  'Endif

End

2017-05-25 11:29 GMT+02:00 Unaise EK <unaiseek at ...626...>:

> this is my code for displaying data in listbox, but it did not working, pls
> help
>
> Public Procedure AddList()
>   Dim ListQurey As String
>   Dim Lresult As Result
>
>   ListQurey = "SELECT name FROM name_tbl"
>   Lresult = MODMain.MyConn.Exec(ListQurey)
>   If Lresult.Count > 0 Then
>   *  Do While Not Eof(Lresult)*
>       ListBox1.Add(Lresult!"name")
>       Lresult.MoveNext
>     Loop
>   Endif
>
> End
>
>
>
>   <https://mailtrack.io/> Sent with Mailtrack
> <https://mailtrack.io/install?source=signature&lang=en&
> referral=unaiseek at ...626...&idSignature=22>
>
> On Thu, May 25, 2017 at 2:52 PM, Unaise EK <unaiseek at ...626...> wrote:
>
> > can you give example for
> > DO WHILE NOT database EOF
> >
> > Loop
> >
> >
> >
> >
> >   <https://mailtrack.io/> Sent with Mailtrack
> > <https://mailtrack.io/install?source=signature&lang=en&
> referral=unaiseek at ...626...&idSignature=22>
> >
> > On Thu, May 25, 2017 at 8:30 AM, PICCORO McKAY Lenz <
> > mckaygerhard at ...626...> wrote:
> >
> >> there are the piece of code and here there's no secret:
> >>
> >> Public Function getItems() As Collection
> >>
> >>   Dim $items As New Collection
> >>   Dim itema, itemb as String = "something"
> >>
> >>   $items.Add($itema, "item1")
> >>   $items.Add($itemb, "item2")
> >>   $items.Add(2, "cuantos")
> >>
> >>   Return $items
> >>
> >> End
> >>
> >> here the previous code "bad programed" and when i swicht to collection
> >> gambas ide get slower after some time, the code was:
> >>
> >> Public Function getItems() As String[]
> >>
> >>   Dim $items As New String[]
> >>   Dim itema, itemb as String = "something"
> >>
> >>   $items.Add($itema)
> >>   $items.Add($itemb)
> >>
> >>   Return $items
> >>
> >> End
> >>
> >> the gambas ide and the OS was not shutdown during 40 days, also the
> gambas
> >> ide was not quit in this period, and in that period i run the huge data
> >> code of the 3 odbc bug with 100000 registers, after change the code to
> >> collection  (each change are little before test) thje ide gambas get
> slow
> >> and does not run well..
> >>
> >> this happened to my other partners in the job... i test also in debian
> >> jeesie and happened same!
> >>
> >> i noted that when alone user said something its like "nothigs its
> >> happened,
> >> its just bad programer"
> >>
> >> will need other to reports, but these other do not have time to make a
> >> little project and report that..
> >>
> >> sqlite was severi broken until gambas 3.6 and must be rewrite for gambas
> >> 3.8
> >>
> >> now in gamba 3.9 ther's some doc-online problems with cache and some
> >> memory
> >> manage problems..
> >>
> >> but for not specialized programmers its very difficult to debug, find
> and
> >> report LIKE THE QT problem..
> >>
> >>
> >>
> >> Lenz McKAY Gerardo (PICCORO)
> >> http://qgqlochekone.blogspot.com
> >>
> >> 2017-05-24 17:01 GMT-04:30 Jussi Lahtinen <jussi.lahtinen at ...626...>:
> >>
> >> > Impossible to say anything without seeing the code, which causes the
> >> > problem.
> >> >
> >> >
> >> > Jussi
> >> >
> >> > On Thu, May 25, 2017 at 12:11 AM, PICCORO McKAY Lenz <
> >> > mckaygerhard at ...626...
> >> > > wrote:
> >> >
> >> > > i change the odbc code for huge data to transport only two objects
> >> with a
> >> > > string, and i noted that gambas before hangs sometimes... so i
> >> discovered
> >> > > that when i used collections the memory management are very bad..
> >> > >
> >> > > should i send a bug or where i start to see why this happened or its
> >> only
> >> > > happened only to me!
> >> > >
> >> > >
> >> > > Lenz McKAY Gerardo (PICCORO)
> >> > > http://qgqlochekone.blogspot.com
> >> > > ------------------------------------------------------------
> >> > > ------------------
> >> > > Check out the vibrant tech community on one of the world's most
> >> > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> >> > > _______________________________________________
> >> > > Gambas-user mailing list
> >> > > Gambas-user at lists.sourceforge.net
> >> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >> > >
> >> > ------------------------------------------------------------
> >> > ------------------
> >> > Check out the vibrant tech community on one of the world's most
> >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> >> > _______________________________________________
> >> > Gambas-user mailing list
> >> > Gambas-user at lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >> >
> >> ------------------------------------------------------------
> >> ------------------
> >> Check out the vibrant tech community on one of the world's most
> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> >> _______________________________________________
> >> Gambas-user mailing list
> >> Gambas-user at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> >>
> >
> >
> >
> > --
> > M. Unaise. E.K
> > 9895687604 <098956%2087604>
> > Librarian,
> > (BLISc, MLIS)
> > JDT Islam Polytechnic College,
> > Vellimadukunnu.
> >
>
>
>
> --
> M. Unaise. E.K
> 9895687604
> Librarian,
> (BLISc, MLIS)
> JDT Islam Polytechnic College,
> Vellimadukunnu.
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list