Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Tip o' the Day
Message
 
 
À
21/04/2000 02:37:45
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00361872
Message ID:
00362177
Vues:
17
Thanks for the correction. I just did a DISP STATUS where VFP identified it as a CDX and not a Structural CDX like my real tables. Just another confirmation of your observation. So, I guess you have to DELETE TAG ALL before beginning transactions.

>Mark,
>
>>This does create a structural CDX file.
>
>No, It creates a compound index file, structural index files have the same name as the table.
>
>Try this example.
>use my_local_or_remote_view
>index on KeyID tag KeyID of addbs(getenv('temp')) + 'AnyName'
>index on Descript tag Descript of addbs(getenv('temp')) + 'AnyName'
>BEGIN TRANSACTION
>	TABLEUPDATE(0,.T.)
>END TRANSACTION
>It errors on the BEGIN TRANSACTION with the error: Table "alias" has one or more non-structural indexes open. Please close them and retry the Begin Transaction (Error 1548)
>
>Walter,
>
>
>>
>>>Mark,
>>>
>>>As I recall, these tables... err.. views won't be available in TRANSACTIONS because you've create a NON-Structural index file (causing an error). Can you check this ?
>>>
>>>Walter,
>>>
>>>
>>>
>>>>I am doing this in VFP 6 SP 3. Your results may vary in earlier versions.
>>>>
>>>>How to overcome those view and cursor indexing blues. Do the following on any cursor or view that is not table buffered. You can switch back to table buffering after creating the CDX.
>>>>use my_local_or_remote_view
>>>>index on KeyID tag KeyID of addbs(getenv('temp')) + 'AnyName'
>>>>index on Descript tag Descript of addbs(getenv('temp')) + 'AnyName'
>>>>Create as many index tags as you want and get NO READ-ONLY ERRORS! As a bonus, when you close the view, the temporary CDX file is removed also. As for coming up with a name for the CDX name, you can use sys(3) or some other variation of creating a temp. You no longer have to do the USE DBF() AGAIN IN 0 trick.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform