Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT and executing command afterwards!
Message
De
24/08/1998 15:40:13
 
 
À
24/08/1998 15:34:42
Koos Veel
Gamma Research
Aruba
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00129440
Message ID:
00129448
Vues:
31
>Hello Edward,
>
>>>We would like to review a table and then record for record execute a command on a record. Just like a while eof() loop routine.
>>>So for instance we have a table which containts filenames. We would like to see if all these filenames exist and if not create them.
>>
>>You can SCAN table and check for FILE(). You can also use SELECT-SQL:
>>Select FILE(table1.filename) AS fileexist From Table1
>
>Thanks for your prompt reply!! But we mainly want to execute a special routine. Not just check for the filename. How can we do that?
>
>Thanks!
>
>Greetings,
>Michiel Willems
>Using the account of Koos Veel

Select-SQL can be extended by using UDF:
Select myfunction(filename) as result From table1

Function myfunction
Lparameter cFilename
DO CASE
....
ENDCASE
Return

However, if you're going to switch work areas you shouldn't use this way, because SELECT can get confused and yield wrong result (usually GPF :). So, for multi-table processings you probably should use SCAN. Certainly, I cannot state it by sure without knowing what exactly you want to process.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform