[Lazarus] save the detail record to sqlite

Antonio Fortuny a.fortuny at sitasoftware.lu
Fri Feb 28 12:43:17 CET 2014


Le 28/02/2014 11:48, Reinier Olislagers a écrit :
> On 28/02/2014 11:43, Antonio Fortuny wrote:
>> Mine desn't like polishing so I've built a bunch of rules for this kind
>> of situation where updatable datasets are involved:
>> - always assign an OnNewRecord event and dive the default value to all
>> defined fields (TFields list). I know, some DBMS do it for you, but ...
>>      on creating the client dataset record, setting the master dataset
>> key is always the first line, process generators, etc.
>> - always explicitely name the used fields in the commanding Sql (any
>> error on connecting to the DB will raise an error)
>>
>> This prevents me to trust my memory too much.
> Hi Antonio,
>
> If you want to change/update/improve the tutorial article, be my guest ;)
I'd be happy to write some advices as far as you could consider them as 
some improvement to the DataSet processing.
I guess you mean the wiki page 
http://wiki.lazarus.freepascal.org/MasterDetail#Adding_detail_records_with_the_right_foreign_key
These are not specifically addressed to the master-detail relationship 
but specifically to the DataSet itself in a more general way.
I can then give the exhaustive list of rules I follow since years.
You could give some ideas on where to write tese rules. As a first 
approach I can point the "SQLDB implementation" chapter.

Antonio.

>
> Thanks,
> Reinier
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>



---
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
http://www.avast.com






More information about the Lazarus mailing list