>>Hola Luis,
>>
>>AFAIK, having a unique key for each record in your child table is needed, for identifying wich record will be updated. So u will have to use a composed key, with the foreing key + another field that uniquely identify each child's record.
>>
>>HTH,
>>
>>J. LUis
>
>Hey Luis,
>Guess what?, I found that if you tell foxpro that you has two
>KeyFields it will work also, first I try what you said, I created
>an index in my child table and it worked fine, then playing
>around I found that if you mark the two fields that compose
>the "unique_id" instead of the "unique_id" itself it works
>exactly the same, Fox takes the combination of the two fields
>to find the record that needs to be updated !, and you don't
>need another index tag.
>Isn't it interesting?
Yup, Actually that's what i mean with composite key. BTW, i've heard somewhere that it's better to have every primary key formed with just 1 field, and using composite primary keys is not recommended. Actually, the RI generator of VFP 3.0 doesn't work well when a table has a composite primary key, dunno if 5.0 does it right.
Ciao,
J. Luis
J. Luis Santiago Rodríguez.• CADIS • E-mail: jlsantiago@iserve.net.mx• Ciudad de México.