Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record pointers on empty cursors/tables
Message
De
02/02/2004 14:04:37
 
 
À
02/02/2004 13:57:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00872917
Message ID:
00873082
Vues:
17
The other restriction too, is that for some reason, whoever creates the table might not call the PK a PK at all. It might just be listed as a 'Regular' index even though it is the "primary key".

In that case, even searching the ATagInfo array won't give the needed information.

I agree with you that there is no perfect solution, but if the key is at all useable, I believe it is far better than using record number.

Alan

>Hi Jay,
>
>
>>I like that, but the cursor/table may be unknown at design time.
>Is there a way to know the key field (or expression) of the current ALIAS?
>
>A partial solution exist, but it is slow:
>
>with
>ATagInfo(ArrayTags)
>you can search a PRIMARY or CANDIDATE index ( but only if indexes are open ),
>store :
>- nWorkArea = SELECT()
>- tagnumber
>- tagvalue = evaluate(tagexpression)
>
>when you restore record position,use
>SEEK(m.tagvalue,m.nWorkArea,m.tagnumber)
>
>but if
>do something
>remove index, remove table, change table schema .....
>it is insufficient.
>
>A general solution, without restrictions is impossible.
>
>Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform