Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table or Cursor
Message
 
À
23/03/2009 11:26:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01390685
Message ID:
01390794
Vues:
81
>Hi All
>
>Suppose I have this situation
>
>
>use (_samples+'data\customer') in 0 Shared Alias Table1
>Create Cursor Table2 (p_name c(20))
>
>? IsTable("table1") && Return .T.
>? IsTable("table2") && Return .F.
>
>Procedure IsTable(tcTableName)
>    *** What is the function?
>Endpr
>
>
>What is the best way of telling that Table1 is "TABLE" and Table2 is "CURSOR"


It's not a solution, but I always name my cursors c_something, like:

select * from mytable where field1='test' into cursor c_mytablefield1test

or create cursor c_something (field1 I, field2 C(50))

That way it is extremely easy to see what's a temporary cursor and what's a real table in my code.

Given my naming convention, I could write a IsCursor function that returns left(alias(),2)="c_"
Brandon Harker
Sebae Data Solutions
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform