Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Message - Cannot Access Table
Message
From
11/08/2003 22:25:01
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00819030
Message ID:
00819232
Views:
10
Hello Nadya:

>Can you check, if PatientDemo is used?
>
Yes it is being used.

>>>Also, may be the problem is that these cursors are somehow closed. Do you know, where do you close these cursors?

This is where the problem appears to be.
	* Select and display Long-Term Regimen 
	SELECT Regimen, StartDate, EndDate, TReference, DocName, ;
		DocNum FROM Treatment INTO CURSOR CurTreatment NOFILTER ;
	WHERE Treatment.HealthNum = mHealthNum and;
		NOT empty(Treatment.Regimen)
	
	*thisform.pageframe1.page5.ravibasegrid1.RecordSource = ""
	thisform.pageframe1.page5.ravibasegrid1.RecordSource = "CurTreatment"

	thisform.pageframe1.page5.ravibasegrid1.column1.header1.Caption = "Regimen"
	thisform.pageframe1.page5.ravibasegrid1.column1.header1.FontName = "Tahoma"
	thisform.pageframe1.page5.ravibasegrid1.column1.header1.FontSize = 8
	thisform.pageframe1.page5.ravibasegrid1.column1.Width = 250

	thisform.pageframe1.page5.ravibasegrid1.column2.header1.Caption = "Start Date"
	thisform.pageframe1.page5.ravibasegrid1.column2.header1.FontName = "Tahoma"
	thisform.pageframe1.page5.ravibasegrid1.column2.header1.FontSize = 8
	thisform.pageframe1.page5.ravibasegrid1.column2.Width = 110
	
	thisform.pageframe1.page5.ravibasegrid1.column3.header1.Caption = "End Date"
	thisform.pageframe1.page5.ravibasegrid1.column3.header1.FontName = "Tahoma"
	thisform.pageframe1.page5.ravibasegrid1.column3.header1.FontSize = 8
	thisform.pageframe1.page5.ravibasegrid1.column3.Width = 110

	mRegimen = CurTreatment.Regimen
	mStartDate = CurTreatment.StartDate
	mEndDate = CurTreatment.EndDate
	mUpdateTreatmentNumber = CurTreatment.TReference
	mDisplayDocName = CurTreatment.DocName
	mDocNum = CurTreatment.DocNum
	
	* This is to ensure that Enter Data is clicked if Treatment is blank
	IF EMPTY(mRegimen)
		thisform.pageframe1.page5.ravieditbox1.Enabled = .f.
	ELSE
		thisform.pageframe1.page5.ravieditbox1.Enabled = .t.
	ENDIF
The "Cannot access selecetd table" messge only comes after I access page4 of pageframe1. If i don;t access that page, I do not get the error message.

>I would comment out CLOSE TABLES in Destroy (you don't need it if you have AutoClose set to .t.) and see, if it makes the difference. In any case, it sounds like these cursors are already somehow closed, which should not be. Can you find out, what method closes them?

Where should I set the AutoClose Property?

Thank you Nadya for your time.
- Ravi

True greatness consists in being great in little things.
- Charles Simmons
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform