Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT tablename not working.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00571350
Message ID:
00571354
Vues:
25
Then I would assume that my choices are to set the focus on some other control on the form, or simply close the form if opened? Would you agree?

>It's one of the grids 'features". They'll re-select their RecordSource if you try to select another table, as long as the grid has focus.
>
>>In my app I have a class for my System Parameters form which uses the Sysdata.dbf table to store user preferences. The sysdata table is opened when my app starts and remains opened. In the LOAD event of the class I have the following code:
>>
>>
>>IF !USED('sysdata')
>>	ERROR 'Initialization Failed: File Sysdata.dbf not open.'
>>	RETURN .F.
>>ELSE
>>	SELECT sysdata
>>ENDIF
>>
>>
>>This works fine for selecting the sysdata table when it is not the current alias, in most cases. The problem is when my main application form is active and the focus is set to the Grid that is on a pageframe on that form, the above select command doesn't work. If the focus is on any control other than a Grid on that form and the System Parameters form is instantiated it works fine.
>>
>>Why when a grid has focus can I not Select another table in code?
>>
>>Thank you in advance.
Elgin Rogers
Epic Solutions
www.epicsolutions.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform