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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic update of the same record in two tables

Status
Not open for further replies.

kafka

Programmer
Oct 17, 2000
27
US
Currently I have a table set up so that for every add to it my autonumber function automatically adds a new record in that table. is there any way to automatically update a second table so that for every add to the first table, a new record is created in the second table which is equal to the new record in the first table. [sig][/sig]
 
There are several ways to do this. I don't know how you inserted your key, if you used Vlad's tip in the FAQ section which is how I do it too you might add a line of code there like REPLACE mytable 2 with nextiid. It should locked too if you're in a multiuser environment or really even if not for scaling up later. Or wrap it in a transaction. Are these tables part of a database or free tables? [sig]<p>John Durbin<br><a href=mailto: john@johndurbin.com> john@johndurbin.com</a><br>MCP Visual FoxPro<br>
ICQ VFP ActiveList #73897253[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top