valt...@valtecom.com.br
unread,Nov 21, 2025, 2:33:18 PM (11 hours ago) Nov 21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Harbour Minigui
Good afternoon friends of the group, I hope you are well,
My post today is about my way of viewing records in "spreadsheet" or "grid" format. Like everyone or most, I am an orphan of CA-Clipper, and in Clipper I used and abused DBEDIT(). When I went to Harbour and Minigui, I saw BROWSE as the successor to DBEDIT(), but it isn't. BROWSE is infinitely slower, especially on a network and with thousands of records. In the case of my clients, it didn't affect them much because they are small companies with few records, but a few months ago I encountered a client with THOUSANDS of records, and my beloved BROWSE couldn't handle it. I posted here in the group, and the response I received was that I should use GRID and search only for records that meet the conditions, for example, a date range, start and end dates, and fill the rows and columns of a GRID. I even tried using GRID and developed a database system. I was using the GRID in MySQL, but I wasn't satisfied, so I had the idea to continue using BROWSE, but in temporary DBF files, and that's what I did for the client with large DBF files. That's what I want to share with you all. For some, it might be a solution, for others not, and for others irrelevant.
When the system starts, whether it's in DBF or MySQL, a function creates and opens DBF files in EXCLUSIVE mode in the Windows TEMP folder with a random name and the necessary fields. These can even be copies of the original DBF files. When the user enters the search condition, the system searches for, say, clients that meet the conditions and stores them in the temporary DBF. In the case of DBF, the search stores the RECNO() of the original DBF in a field of the temporary DBF, making it easier to locate in the original DBF. Just use DBGOTO() and you're done. What observation did I make? I noticed that DBZAP() in a temporary DBF is faster than DELETEALL in the GRID, and DBAPPEND in a temporary DBF is faster than AADD ITEM in the GRID, at least that's what I noticed. So I preferred to use BROWSE. BROWSE also allows some tricks, like setting background colors for records according to conditions, for example, setting a red background for clients with debt. I noticed that doing this in the GRID is slower.
That's what I wanted to share with my friends.
I hope it helps someone.
Best regards to all.
Valteçom
Uberaba MG Brazil