Subject Re: [firebird-support] editing a header/detail document.
Author Sergio H. Gonzalez
"Sasha Matijasic" escribió
> Ok, so you need to lookup the documentation and demos for ibx components.
> Basically, study TDataSet descendant and TDataSource classes and learn how to
> connect visual components (like, TDBEdit, TDBGrid and such...) to them. Google
> it and you'll find examples and tutorials on the net.

Hi Sasha! I'm very sorry I didn't explain myself better when I posted this
thread... I do use the IBX components and also the dataware visual
components in my app. In almost all the forms I use
ClientDatasets/DatasetProvider. So I have very short read-write transactions,
and for the small tables I use TQuerys with read-only transactions. I also know
what databases are. I follow all the normalisation rules in the design...
Again: I'm so sorry for posting an unclear question.

Only for my base form to do master/detail documents
(invoices, sales orders, purchase orders, stock movements, etc...) I construct
the SQL and send it to the database. Actually I'm quite happy with it. I use a
read-only transaction to read all the tables I need and then I start a
read-write transaction, execute the script and commit. If the user don't save
the document I have no need to rollback. And most important (for me) I dont have
a read-write transaction open while the user is doing the invoice (it may take a
long time to do it). Anyway... I'm still a newbie!! And probably this is not the
best way to do it...

My original question probably should have been "how bad is to perform a bulk
delete (usualy less than 20 and rarelly more than 300) and then insert them
againg with the (posible) changes". If this is a bad practice I can check what
records changed and update them and delete/insert the deleted/new records. This
only happens when the user opens an already saved document modifies it and saves
it again. Not very often, really.

Sorry... and thank you very much!

-s