EDatabaseError when trying to edit locked data ( TDBMemo, TDatasource, TDbf )
Original Reporter info from Mantis: Handoko
-
Reporter name: Handoko
Original Reporter info from Mantis: Handoko
- Reporter name: Handoko
Description:
Hi all.
I want to report a bug.
The TDBMemo will raise an exception if you try to edit its data where the Datasource.AutoEdit = False. The exception raises not when you edit the content, but after the TDBMemo lost focus. Also, it's will raised only if the field type is TMemoField not on TStringField.
Conditions to make the exception raised:
- A Dbf (from DBFLaz package)
- A Datasourse, a DBMemo
- All the components above are linked together
- DBMemo.DataField is linked to a TMemoField-typed data
- The Datasource.AutoEdit := False
- Run it, type something on the DBMemo
- Make the DBMemo lost focus (press tab or click other controls)
I think it is a bug, because:
- If the field type is TStringField, the exception won't raised.
The text will be reverted if it lost focus.
- If the field type is TMemoField, an exception will raised.
The text SHOULD be reverted if it lost focus.
- No matter what the field type is, it should not raise an error.
Because the data is locked (Datasource.AutoEdit = False).
I hope my explanation could help.
Additional information:
I'm using:
- Lazarus 0.9.26 Beta
- FPC Version 2.2.2
- WindowsXP on Intel Pentium 4
Units used:
- DbCtrls
- dbf (DBFLaz 0.1.1 Package)
Error raised:
- Exception: 'EDatabaseError'
- File: dbmemo.inc
- Procedure: TDBMemo.UpdateData
Mantis conversion info:
- Mantis ID: 12997
- Fixed in version: 0.9.27 (SVN)
- Fixed in revision: 20050 (#b8e42585)
- Monitored by: » Handoko (Handoko)
- Target version: 1.0.0
- LazTarget: 1.0