Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying Data
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00020652
Message ID:
00020681
Vues:
41
>>>I NEED HELP!!! Perhaps I am inept (spelling sucks to).
>>>
>>> A brief description of my problem:
>>>
>>> I would like my users to enter data into a PRIMARY FIELD in TABLE A and have said data automatically be entered into TABLES B, C , D, etc. behind the scenes. The user will only enter this data via a FORM.
>>>
>>> I want to able to do this via an EVENT driven proc. or func. attached to a command button of my own design. (I do not wnat to use Microsoft's canned Navigator Bar).
>>>
>>> THIS MUST WORK IN VFP 3.0
>>>
>>> Thanks, any help would be greatly appreciated.
>>>
>>> Struggling since NOV '96
>>> Jon Odom
>>
>>My suggestion would be to use a stored procedure in your DBC. Edit your stored procedures (be careful) and add a function to do this when you save the record. Use SQL Insert in this function such as this...
>>
>>INSERT INTO myOtherTable(field) VALUES(currentTable.fieldValue)
>>
>>Now create an insert trigger in your main table to call this new function.
>>
>>HTH
>
>When I create the Insert trigger how will that affect Referintial Integrity. Considering I can only have one trigger per table. Should I just make a call to this funtion in the RI trigger?

That's entirely up to you, however, I believe you are attempting to populate a key field of another table here, and you wish to have only one record as in your parent table. (Have you considered putting those fields in the parent table?) My understanding you have a one to one relationship with tables B, C, D or if they're one to many you are trying to prevent a EOF encounter?? Can you explain further your goal and relations?

HTH
Jon Paskett

Microsoft Certified Systems Engineer
We all have to start somewhere...
Sometimes over again!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform