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

Relating Cursor with a base table - how to update base?

Status
Not open for further replies.

EMJULIAN

Programmer
Aug 14, 2002
45
US
I have a form that has several grids on it. The data sources in these grids are filtered, so the scroll bars on the grids don't look quite right. To fix this I want to
1) copy the filtered data into a CURSOR or working table
2) use the CURSOR/working table as the data source for the grid so the scroll bars work correctly
3) link the CURSOR/working table back to the base table (original data) so that any changes (additions, deletions or edits of records) is recorded there as well.

My question is, what is the most efficient way to do this? I can "double code" it - changing info in both tables simultanously, but I have a feeling there's an easier way to update the base table from the working table. Any help is much appreciated.

Thanks!
Eve
 
I am not using any DBC's with this application if I can help it. Do you have any other suggestions?

Thanks,
Eve
 
Eve,

I would definitely go with Ramani's suggestion. There are probably other ways of achieving your goal, but using local views will be the easiest.

You say you don't have a DBC in this app. That's OK. But is there any reason why you can't create a DBC solely for the purpose of holding these views? It won't affect you main data, which will continue to be in free tables. You could even create the DBC and the views on the fly in the Load of the form, and delete them in the Unload.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top