apti
Member
I have been getting a very strange issue. on the test device used to develop everything is fine. however all the other devices using the software are seeing this issue.
I have a listbox that is getting duplicate information. It fills up twice with the same info. below is the code. Maybe I am missing something but even if this sub is executed twice or 100 times it should only have one copy of information in it because I clear the list first. What is it I am missing? the information is the list is repeated so item 1,2,3,4 followed again by 1,2,3,4 not listed as 1,1,2,2,3,3,4,4.
Sub PopulateShortcut(crap As String)As ResumableSub
Dim R As String
Dim DBIP As String= INI.ReadString("DBINFO","DBAddress","") <--------------------- database stuff
Dim DBPort As String=INI.ReadString("DBINFO","DBPort","") <--------------------- database stuff
Dim DBUser As String=INI.ReadString("DBINFO","DBUser","") <--------------------- database stuff
Dim DBPassword As String=Func.DescrambleAugment(INI.ReadString("DBINFO","DBPassword",""),7,4) <--------------------- database stuff
lstshortcut.Clear <---------- clears list
HMShortCut=0 <------ just a counter for debugging
If OkToPopulateShortcut Then <----------- checks if a special condition is set. if so then list left blank
wait for (SQ.GetData(DBIP,DBPort,"LCARS",LCARS1.D_Shortcut,DBUser,DBPassword,"ComName",1,"uName = '"&SysUser&"' ORDER By ComName")) complete(R As String) <--- gets info
Do While R<>""
lstshortcut.AddSingleLine(Func.GetFieldByPlace(R,Func.cRecordDelimter,1)) <----- gets first record in the results
R=Func.DropFirstField(R,Func.cRecordDelimter) <---------- removes first record from results
HMShortCut=HMShortCut+1
Loop
End If
Return crap
End Sub
I have a listbox that is getting duplicate information. It fills up twice with the same info. below is the code. Maybe I am missing something but even if this sub is executed twice or 100 times it should only have one copy of information in it because I clear the list first. What is it I am missing? the information is the list is repeated so item 1,2,3,4 followed again by 1,2,3,4 not listed as 1,1,2,2,3,3,4,4.
Sub PopulateShortcut(crap As String)As ResumableSub
Dim R As String
Dim DBIP As String= INI.ReadString("DBINFO","DBAddress","") <--------------------- database stuff
Dim DBPort As String=INI.ReadString("DBINFO","DBPort","") <--------------------- database stuff
Dim DBUser As String=INI.ReadString("DBINFO","DBUser","") <--------------------- database stuff
Dim DBPassword As String=Func.DescrambleAugment(INI.ReadString("DBINFO","DBPassword",""),7,4) <--------------------- database stuff
lstshortcut.Clear <---------- clears list
HMShortCut=0 <------ just a counter for debugging
If OkToPopulateShortcut Then <----------- checks if a special condition is set. if so then list left blank
wait for (SQ.GetData(DBIP,DBPort,"LCARS",LCARS1.D_Shortcut,DBUser,DBPassword,"ComName",1,"uName = '"&SysUser&"' ORDER By ComName")) complete(R As String) <--- gets info
Do While R<>""
lstshortcut.AddSingleLine(Func.GetFieldByPlace(R,Func.cRecordDelimter,1)) <----- gets first record in the results
R=Func.DropFirstField(R,Func.cRecordDelimter) <---------- removes first record from results
HMShortCut=HMShortCut+1
Loop
End If
Return crap
End Sub