Discussion of open issues, suggestions and bugs regarding LiteDAC (SQLite Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
- Posts: 99
- Joined: Sat 18 Aug 2012 08:33
I tried to open a table where one field missing in table of Database.
Data.DB correctly raises the EDatabaseError in
Code: Select all
procedure DatabaseError(const Message: string; Component: TComponent = nil);
but this error does not arrive in your TLiteConnection.onError.
Shouldn't be that handled in OnError of TLiteConnection?
- Devart Team
- Posts: 5530
- Joined: Tue 10 Aug 2010 11:35
If the number of fields or their types don't match, then the error is generated not by the database, but by Delphi using a usual method Raise. Therefore the onError event doesn't occur, since it works with errors generated by the database. If you need to handle this error, you can use a try...except block.