I have a Windows desktop app (using v2025r3) which is in use across multiple sites and has been now for several months. The app is based around retrieving customer details into various listboxes from a local MSSQL database.
One strange issue is that suddenly, maybe after many days or weeks, a random site will stop displaying content inside a DesktopListBox. I’ve added statements into a log file to confirm rows have been added and also added a refresh statement just in case it’s a display issue. The listbox is inside a container if that makes any difference?
Anyone have any ideas why this might happen please? Logically it might point to some data issue but when it stops displaying content, it will not then work for any other data until the app is closed and restarted - at which point it’s fine again. I’ve seen it happen on a couple of the listboxes although the main 2 are most likely to have data in any case.
I’ve attached the main retrieve-data code (including added log statements) for reference. Any thoughts appreciated. Thanks
//2. retrieve client credits (for on-screen listbox)
MainWindow.CreditsContainer.ListCredits.RemoveAllRows
sql=SQLQuery("ClientCreditsList")
Try
rows = db.SelectSQL(sql,client_id)
If Not rows.AfterLastRow Then
For Each row As DatabaseRow In rows
MainWindow.CreditsContainer.ListCredits.AddRow(row.column("credit_category").stringvalue, row.column("salon").stringvalue, row.column("credits").stringvalue, row.column("label_time").stringvalue, row.column("expiry_date").DateTimeValue.ToString(Locale.Current, DateTime.FormatStyles.Short, DateTime.FormatStyles.None))
Next
l4x.Log "Client credits read",Log4Xojo.LogLevel.Info,CurrentMethodName
l4x.Log "ListCredits RowCount=" + MainWindow.CreditsContainer.ListCredits.RowCount.ToString,Log4Xojo.LogLevel.Info,CurrentMethodName
Else
l4x.Log "Client credits- no data",Log4Xojo.LogLevel.Info,CurrentMethodName
End If
l4x.Log "Client credits complete",Log4Xojo.LogLevel.Info,CurrentMethodName
Result = True
Catch e As DatabaseException
ShowError e.Message, CurrentMethodName + "/2:for listbox"
End Try