Programming => Databases => Topic started by: mmelwin on June 18, 2021, 07:59:17 am
Title: Locate error
Post by: mmelwin on June 18, 2021, 07:59:17 am
I also put it here because I think the problem is with SQLQuery and not with DbGrid.
When I click on DBGrid while running a Locate on SQLQuery, the DBGrid crashes. Can I prevent this somehow? Disable / EnableControls doesn't help. I am attaching two screenshots, before and after Locate.
Lazarus 2.0.12, FPC 3.2.0, OS Win10, PostgreSQL 13
In demo: Please click "Populate", wait a while, click "Locate" and quickly click in the DBGrid area. The problem only occurs when the searched field is sorted descending. For ease of use, the demo uses SQLite.
Title: Re: Locate error
Post by: Soner on June 18, 2021, 08:30:22 am
I tested with lazarus 2.0.11 fpc 3.2.1 both 64 bit and Lazarus 1.8.5 with fpc 3.0.4 32bit on Windows 10. I could not reproduce the error, from original post too.
Have your computer enough ram? Your program consums 423 MB RAM. Without enough free RAM swapping and locate can take a long time. For me it looks like speed problem caused by ram on your computer wait at least 1 minute after clicking locate.
Title: Re: Locate error
Post by: mmelwin on June 18, 2021, 08:49:15 am
I think I've found the problem. Out of memory. Everything is fine after compiling to x64. I just need to find some other solution, because I have several computers with Win XP 32bit :(
Title: Re: Locate error
Post by: Zvoni on June 18, 2021, 01:45:18 pm