Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open .idx takes long to open
Message
 
 
À
18/08/2008 18:25:00
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
01339763
Message ID:
01339765
Vues:
12
>I'm debugging an application in foxpro for dos 2.5. I've noticed that the program is copying the file structure from the network to a local drive, opening the file in the local drive, creating an .idx index and reopening the file but this time exclusively. The problem is that when the local file is opened along with the IDX it takes around 45 seconds and there are no records and it's local, basically opening the index file is taking 45 seconds, b/c opening the file without the index is instantaneous. ex:
>
>
> USE X:\TheFile
> localFile = 'c:\temp\'+sys(3)
> COPY STRUCTURE TO &localFile
>
> use (localFile) Alias TheFile
> index on reg_num to &localFile
>
> ** This line takes about 45 seconds and it's an empty dbf on the local drive
> use (localFile) Alias TheFile INDEX (localFile) EXCL
>
>I think you only need the last line b/c it's taking a while when opening the index, but put the entire code as reference just in case.
>
>Thanks!

Ron,

Is it possible to switch to CDX instead for the whole project? It would be much better if you can. Also in this quoted code you don't need to use macro in all the cases. Use name expression for all cases.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform