Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace cursor
Message
De
03/02/2003 13:25:16
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
À
03/02/2003 06:42:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00748127
Message ID:
00748490
Vues:
23
>I added your code in the beginning of the command button.
>I got the following error message:
>
Operator/operand type mismatch (Error 107)
>I debuged it and I discovered that the error apeared only in the second scan of the array.

If you run AUSED(), close some cursors or tables, then you should run the function again to reload the array. (I'm not sure exactly "how" you are using the code, so it could be something else).

>Ohh, I have better way:
>Create one array with dbf extention drom the current directory.
>create second array for the used tables\cursor.
>scan the second array
>if the line not apeared in the second array then we can use with 'use in' command.
>
>This is my first steps in Foxpro, If it's not difficult for you, can you build something like this?

The code I showed you assumes you are using some sort of naming convention for you cursors (eg. cursor1, cursor2, etc. ... as you showed before).

Your 2 table approach is not practical because (without a naming convention) a cursor can look just like a table on the surface. For example, using the function DBF() on an alias returns the filename xxx.DBF for a table, xxx.TMP for a cursor SOMETIMES and xxx.DBF at other times (when the cursor is identical to the source table).

Using a naming convention is simpler all around. I usually prefix all my cursors with "TMP".
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform