Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving changes from listboxes to target table
Message
 
To
12/03/1997 09:38:48
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00023355
Message ID:
00023900
Views:
34
> > >Now here's a question. Is there some easy (?) way to check for changes and > update target table? I don't need to update the source, it's just a list of > all possible records. I already have a "change checker" In every click > method I set property "changed" to .T. So, how to update it? There are > possible insert and deletes too. > > Sure.. just put the code to move the records in the InteractiveChange > event of the listbox You can use the Selected() array property of the > listbox to find out which items are selected. If you're using table or > views, use the REQUERY(TableName) command to refresh. Yes, I've done it in similiar way. In screen changes are committed when user chose button to save or cancel changes. But is there any easy way to save changes into taget table? Right now I'm doing this when saving changes: scan listbox and compare if every item is in table and append if not scan table if every record is in listbox and if not delete it It's quit dummy code and I'm looking for more "inteligent" and safer way. And I don't have set rowsource in my listboxes. I add items by scanning table and doing additem(). Any ideas what would be better? TIA Dezider --
There were three worst disasters in the history of human
race in 20-th century:
1, Hiroshima 44
2, Tchernobyl 86
3, Windows 95
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform