Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Record Source Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Grid Record Source Problem
Divers
Thread ID:
00124705
Message ID:
00124705
Vues:
51
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
Fil
Voir

Click here to load this message in the networking platform