Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append from with 'create cursor' cursor possibly failing
Message
 
 
À
14/08/2001 09:34:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00543285
Message ID:
00543508
Vues:
10
Good question. Append from < TableName > always looks for the table TableName.dbf on the disk regardless if it's open or not already. Because of that
Append from respmatr
   and 
Append from ( dbf('respmatr')  )
are not the same. The first one references respmatr.dbf and foxpro'll look for it starting with default directory and so on. The second one references a table open under alias 'respmatr'. It could be the same as the firts one or the different one. If you've only one table respmatr.dbf on the path and it's open under alias respmatr than you can use eaither one otherwise second one is preferable.

The following append could "fail" if cresphdrid<>lc_cresphdrid
Append from respmatr for cresphdrid=lc_cresphdrid  
>Thanks Sergey,
>
>It seems even less likely then that the append failure has anything to do with the fact that it is a cursor.
>
>In your opinion which append from statement below is more likely to fail?
>
>Should I also be using append from dbf('respmatr') in the one that is appending from the table, or is it adequate the way it is?
>
>Respmatr is a table that is opened in the form, in the data environment.
>
>>The CREATE CURSOR command always creates a cursor as a temorary file on a disk.
>>
< SNIP >
>>>
>>>I have similar code as follows:
>>>
>>>=afields(larespmatr,"respmatr")
>>>Create cursor currespmatr from array larespmatr
>>>Select currespmatr
>>>Append from respmatr for cresphdrid=lc_cresphdrid &&respmatr is a table in the database
>>>
>>>Then later on:
>>>
>>>select respmatr
>>>append from dbf('currespmatr')
>>>
< SNIP >
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform