Luiz Americo wrote:
This is the way TDataset works. If a record is not posted then it can be cancelled (maybe DBGrid is calling cancel in this case).
A simple way to add a record is to do a procedure like:

 ASlite.Append;
ASqlite.Post;

and associate with a button OnClick event.

Be aware that data will not be saved to database. If you want this then call ApplyUpdates (see conditions in wiki to ApplyUpdates work) or set SaveOnClose to true.

I'd like the new record to be posted by default when I change to another record instead of being canceled. Is putting Post on the events the best way to go? It seams a little ugly to add OnClick just for that. And then I will also need OnKeyDown for the keyboard...

Active:=True; ?

I see no such property on TSqliteDataset. It does exist on TDbf, however. Maybe it should be added??


BTW: Are you brazilian?

Yes =)

thanks,

Felipe

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to