Information générale
Catégorie:
The Mere Mortals Framework
>>Do both data environments load a cursor with the same name?
No. The pageframe includes 6 pages of informaton depending on the student selected from a master file. The 2nd page includes a group of profile defining combo boxes. Two of the combo boxes are set for type of training (two types this the two different data enviromnemts because the detail information and grades are different for the type types of training) the student is taking and another is set for the year of school(1 thru 4). There can be multiple grade records for each student(a record for each year). The loading of one of the two data environments (done on the third page)depends on the content of the type of training combobox.
Based on the combobox setting I load the correct data environment. When the ist grade record is called up everything is fine, but if I go back to page 2 and change the grade year and then go to page 3 to view the content of that grade is where the error 'File is open' comes up. If I hit ignore the record displays OK.
It doesn't matter which data envirenment is loaded, the second time the view is queried the file error occurs.
The code is as follows:
**************************************
*!* Load the correct data environment based on the class method of this student
if v_sprofile.iclassmeth = 254
goApp.oiecstdAbsFactory.AbstractFactoryObj.LoadDataEnvironment('iechsabsfactoryenvironment')
else
goApp.oiecstdAbsFactory.AbstractFactoryObj.LoadDataEnvironment('iecstdabsfactoryenvironment')
endif
This.AddObject('cntstudentgradelist', ;
goapp.oiecstdAbsFactory.GetClassName('cntstudentgradelist'))
WITH this.cntstudentgradelist
.Left = 6
.Top = 3
.Visible = .T.
ENDWITH
*!* Select and requery the correct views for each option
if v_sprofile.iclassmeth = 254
select v_hsgrades
requery()
*!* check for current grade record - if none create new one ?
if EOF()
nAnswer = messagebox(cMessageText, 36, cMessageTitle)
if nAnswer = 6
This.cntStudentGradeList.hsgradesbizobj.buildrecord()
endif
endif
else
select v_studentgrades_sum
requery()
Select v_StudentGrades
REQUERY()
endif
Select v_roclass_nbr
Requery()
thisform.lockscreen = .F.
ThisForm.Refresh()
Thanks for your response Kevin.
Bill
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement