Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update multiple table data in the same form

Status
Not open for further replies.

georgegar

Programmer
Jan 27, 2003
8
MX
Well Im a clarion programer (beginner) so I need to update data from diferent tables using the same update procedure.

(In the same window can update costumer and detail for envoice)

Actually I can call the update procedure using a button, but i want in the same window.

If you can help, i really apreciate.

Jorge Garcia
 
The basic FORM template updates only one table but that does not prevent you from embedding source code to do the remaining. If you are using ABC and you want the update of the Secondary files to take place after the Primary file update, the embed point is Window Manager --> Take Completed --> after Parent Call. The code would be like :

IF NOT ReturnValue ! if primary file update was sucessful
Relate:SECFILE1.Update()
Relate:SECFILE2.Update()
...
END

If the the procedure is a basic WINDOW procedure, you could place the code in the EMBED of the OK button.

In your case the INVOICE would be the Primary File and CUSTOMER would be the secondary file.
 
Hi,

A cool way to do what you want is to declare a VIEW. Look in the help it shows how to do it.

Valery.
 
I think there will be a problem with a VIEW as it updates only the PRIMARY table and not the SECONDARY ones.
 
TNX Vpos and ShankarJ,,, I really apreciate your help.

And it works great.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top