Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changes in the grid not updating view
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Changes in the grid not updating view
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01002667
Message ID:
01002667
Vues:
52
I have a parameterized updatable view called 'lv_pinfo' (foreign table) that I call to display records in a grid:
lc_id = lv_person_search.personid &&drop down box select record
REQUERY('lv_person') && parent record

lc_id = lv_person_search.personid &&drop down box select record
REQUERY('lv_pinfo') &&get child records
After the records are displayed in the grid, my user clicks on a button (SEVERAL TIMES) that inserts blank record in the grid. I do this by inserting the view with foreign key:
&&cmdcreateblank
	insert into lv_pinfo (personid) value (lv_person.personid) && this is creating blank records in the grid 
	TABLEUPDATE(.T.,.T.,'lv_pinfo')
	.pf1.p2.gridpinfo.column1.text1.setfocus()
	.refresh()
after the blank records appear in the grid, my user next goes in the grid and fills in the information on the blank records. After that I have another button that saves the this filled information. The problem is that the information is not updating to my view on this second button. Here is the code that is suppose to save changes made on the grid:
	TABLEUPDATE(.T., .T., "lv_person") &&parent table
	TABLEUPDATE(.T., .T., "lv_pinfo") &&child table this should update my grid changes but it doesn't work
	.refresh()
here is what the updatable view looks like. Pinfo.personid is foreign key (regular), and Pinfo.ppnextid primary key (primary) :
SELECT Pinfo.personid, Pinfo.comment, Pinfo.workdate, Pinfo.workhour,;
  Pinfo.shiftinfo, Pinfo.ppnextid;
 FROM ;
     workprog!pinfo;
 WHERE  Pinfo.personid = ( ?lc_id );
 ORDER BY Pinfo.ppnextid
This has driven me nuts for about a week, there must be something I'm missing here. Does anyone see anything wrong here or have suggestions.

thanks
Nick
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform