Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saving grid data back to original table
Message
De
09/10/1997 14:28:37
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, États-Unis
 
 
À
09/10/1997 11:36:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00053895
Message ID:
00053935
Vues:
29
>>I'm using a grid whose record source is a view to collect data. I'm trying to save the changes a user makes in column2 back to the original table by using code in the LostFocus method of the textbox under the column2.
>>
>>My code (which isn't working of course) looks like this (again, it's grid->column2->text1's LostFocus method):
>>
>>local lview, lswid, lver
>>*the following 3 lines capture the current view record data to use
>>* as a filter in the original table
>>lview = this.parent.parent.recordsource
>>lswid = &lview..software
>>lver = &lview..version
>>*select the original table, use a filter to access the correct
>>* record and replace 'version' field with the value in the
>>* current grid-column-textbox
>>select software
>>set filter to acode=caid and hwid=chwid and software="&lswid" and version="&lver"
>>go top
>>replace version with this.value
>>
>>Any clue what I'm doing wrong? Similar code is working for my combo boxes but for a 'simple' text box, this isn't working.
>
>If you have a buffering on the view, you only have to do TABLEUPDATE().

Ok, clueless that I am, I don't believe I have buffering on my views. I understand the general idea of buffering but could someone explain this as it relates to views (and how I do it)?

Two things to note: (1) some of my views actually come from the joining of another view previously created and a table. Does this affect anything?

(2) I'm a bit confused with the View Designer's "Update Criteria" tab options. Specifically, I don't have any one key field(s) in these particular views. A combination of all 4 fields in the view results in a unique combination/key. I'm not sure then if I can use the "Key Field" and "Updatable" switches for my views. I've assumed I can't thus my rationale for trying to save the form data to the tables via code.

Your thoughts? Am I being clear as to what's going on?

Thanks!

=8^0Mandy
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform