Forum > LCL

DBGrid error

(1/3) > >>

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.

Only some screenshots does not help much. We need more information. Please provide more information to help us help you.

Version of the software (OS, Lazarus, database, etc) and steps to reproduce the issue. It will be extremely helpful if you can provide the compile-able source code, so we can inspect and debug it on our computer. If you're not willing to publicize the project, you can write a short demo that can let us to reproduce the problem.

You can use the Publish Project feature in the IDE:
Lazarus main menu > Project > Publish project

Or manually select and include the files:
Create a new folder, copy and paste all the necessary files (including the data file) except: the binary (exe file), *.bak, lib and backup folders. Compress the folder and send the zip to the forum.

Lazarus 2.0.12, FPC 3.2.0, OS Win10, PostgreSQL 13. I will prepare a 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.

I tried your example and I can confirm the problem.

I then tried with ZeosDBO components and it works, but maybe because it locates row before I have a chance to click DBGrid.

Test project with ZeosDBO components is attached if you want to try it.


[0] Message Index

[#] Next page

Go to full version