I am using vfp 8.
I have a form with a parametric view called vtopic in the data environment.
I have set:
Dataenvironment.AutoOpenTables = .F.
Cursor1.NoDataOnLoad = .T.
On the form there is a grid with recordsource = vtopic and recordsourcetype
= 1 - Alias.
Two comboboxes determines the parametric value of the view. When the
comboxes undergo InteractiveChange a method is called up to calculate the
parameter and update the grid:
* thisform.updategrd()
MESSAGEBOX(thisform.grd1.RecordSource) && displays 'vtopic' as it should
select topic_key From topiclist Where subject_key =
Val(Thisform.cmbsubject.Value) ;
AND grade_key = Val(Thisform.cmbgrade.Value) Into Array la
If _Tally = 0 Then
DIMENSION la(1)
la = 0
ENDIF
REQUERY(thisform.grd1.RecordSource) ***
Thisform.grd1.Refresh
This is the view:
SELECT Topic.key, Topic.topic;
FROM ;
topic;
WHERE ASCAN(?la,key) > ( 0 );
ORDER BY Topic.topic
When I run the form I get the error message 'Alias not found' in the line
marked with *** above.
The form uses private data session.
Any help is greatly appreciated.
One more thing. I want to use optimistic table buffering, so in the forms
init method I have:
SET MULTILOCKS ON
=CURSORSETPROP("Buffering", 5) && optimistic table buffering
Is this the way to do it?
Sincerely,
Jan Nordgreen