Hello, please a little help, I have created a program in B4J, the program is a point of sale, at the beginning of the day it works fine but then in the afternoon it gets slow and crashes.
He revisado el código en las rutinas que más se ejecutan y desconfío del siguiente código ya que desconozco su funcionamiento interno:
and when starting the program in AppStart I call this routine that loads about 8,000 products:
Thank you very much and I will be attentive to any guidance.
He revisado el código en las rutinas que más se ejecutan y desconfío del siguiente código ya que desconozco su funcionamiento interno:
product search:
Private Sub btnSearch_Click
Wait For (Dialog.ShowTemplate(SearchTemplate, "", "", "CERRAR")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
codeselec = MidExtract(SearchTemplate.SelectedItem,"[","]")
End If
txtcodebar.RequestFocus
End Sub
and when starting the program in AppStart I call this routine that loads about 8,000 products:
This is called only once when starting the program:
Sub CargaData_Busqueda
Base = MainForm.RootPane
If Dialog.IsInitialized = False Then
Dialog.Initialize (Base)
End If
Dialog.Title = "Busqueda Por Nombre"
SearchTemplate.Initialize
If Items99.IsInitialized = False Then
Items99.Initialize
End If
Items99.Clear
''*********************************************************************************
segcsr = conn.ExecQuery("SELECT Codigo, Nombre From productos")
Do While segcsr.NextRow
codeselec = segcsr.GetString("Codigo")
elname = segcsr.GetString("Nombre")
Items99.Add(elname & " " & "[" & codeselec & "]")
Loop
segcsr.Close
codeselec = ""
elname = ""
''*********************************************************************************
SearchTemplate.SetItems(Items99)
End Sub
Thank you very much and I will be attentive to any guidance.