Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange APPEND FROM problem
Message
De
29/03/2006 01:38:42
 
 
À
29/03/2006 01:33:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01108188
Message ID:
01108705
Vues:
15
>>>I am probably missing something very simple (I guess too many hours working today <g>). Here is the situation:
>>>
>>>
>>>* Cursor MyCursor is empty
>>>* Table  MyTable has field PK. The first record of MyTable PK is 5
>>>* Other record in MyTable have different values of PK (1,2,etc).
>>>* The following command is supposed to append records...
>>>select MyCursor
>>>append from MyTable for MyTable.Pk = nPk
>>>* but the above works only if nPk is = 5 (that is, the value in the
>>>* first record of MyTable. If I try any other value of nPk, no
>>>* records are appended to MyCursor
>>>
>>>
>>>What am I missing?
>>>
>>>Thank you.
>>
>>this doesn't work because APPEND FROM read file's data,
>>help doc is:
>>APPEND FROM FileName
>>
>>not from an alias, then it can't see SET FILTER, SE KEY , INDEX ...
>>Every reference on the FOR clause it is applied to the alias,
>>and it is constant because the alias record pointer don't change
>>during the APPEND execution.
>>
>>Example,
>>
>>CREATE CURSOR byby (aa i)
>>ON ERROR ? MESSAGE(),"command: ",MESSAGE(1)
>>APPEND FROM DBF("byby")
>>
>>* error
>>APPEND FROM byby
>>
>
>
>Fabio,
>
>It may give an error on cursors, but it will not if MyTable.dbf happens to exist in the path
>eg, if MyTable is in the database and the PATH includes databasepath
>
>then ... help file ...
>
>Arguments
>
>FileName
>
>Specifies the name of the file to append from. If you don't include a file name extension, a Visual FoxPro table and a default extension .dbf is assumed. If you are appending from a Visual FoxPro table, records in the table that are marked for deletion are appended, regardless of the SET DELETED setting.
>
>

>
>UPDATE
>
>It even translates the long tablename in the database to the short name on the disk

of course.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform