[...] If you use postgresql there is option: select nextval('seq_name'). I use these options already.
Yes, I know. This is actually the problem with sqldb or zeosdb. They don't let me free to use the maximum power of db engine. They want avoid to the programmer to write code and know sql.
Even if I get the id from seq, I cannot update the dbgrid.cell or I must set the dataset.field from onBeforePost, but can loose an ID if user wrong.
Another problem I have is that the a DELETE don't really remove the line from db but set only disabled field of the record and that I use a field of the query as message carrier for the front end.
Sqldb is very well done but too complex and too automatized without be really complete. Zeosdb looks more complete but suffer of same problems.
It seems like I need only a subset like:
tsqlquery = class
onInsert // where write and run my sql code and manage errors
onUpdate // where ...
onDelete // ...
onSelect // ...
Refresh
RefreshRow(TFields)
end;
that let me to be responsbile for my own.