Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter AutoRefresh
Message
De
11/07/2005 15:41:51
Luis Navas
Independent Consultant
Auckland, Nouvelle Zélande
 
 
À
08/07/2005 18:47:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01030790
Message ID:
01031375
Vues:
17
Thanks a lot.

Luis Navas


>Luis,
>
>>I have populated the InsertCmdRefreshKeyList with the name of the field. But it's not working. Pleas an advice.
>
>There is no InsertCmdRefreshKeyList property. :-)
>
>There are 3 properties that can work in some combination to give you what you want. If you have another unique field in the record being inserted and you already know the value of that field (it is assigned in the cursor before the Insert), you can use that field as the lookup key to find the record just inserted. Assuming that your field really is called "identity":
.InsertCmdRefreshKeyFieldList = "SomeOtherUniqueFieldName"
>.InsertCmdRefreshFieldList = "Identity"
CursorAdapter will use those properties to automatically build a query and refresh any fields listed in the InsertCmdRefreshFieldList.
>
>If you do not have another unique field that can be used to find the record just added, you might have to make use of the InsertCmdRefreshCmd property to specify a query that matches the Identity field to @@IDENTITY. (This idea comes from the "New in Nine" Hentzenwerke book):
.InsertCmdRefreshCmd = "Select Identity from tablename where identity = @@IDENTITY"
>.InsertCmdRefreshFieldList = "Identity"
I never forget a face, but in your case I will make an exception :-)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform