Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Grid Record Source Problem
I have a form that accepts a parameter that is used in a select sql statement that in turn loads a grid. ie:
Form Init:
PARAMETERS pcGuestNumber
LOCAL lmAlias
lmAlias = alias()
this.grid1.recordsource = ''
select * from bills;
where gnum = &pcGuestNumber;
order by gnum into cursor billcurs
this.grid1.recordsource = 'billcurs'
if !empty(lmAlias)
select &lmAlias
endif
The error is "Cannot find variable pcGuestNumber" but if I comment out
the line that sets the recordsource of the grid, there is no error and the cursor is available just like it should be. gnum is a regular index, not unique. The recordsourcetype is set to alias. Do I have to index the cursor after the query? It seems to me the cursor should already be ordered and should not require an index to populate the grid? I've run into this before but I still don't understand this error.
Eric K.
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