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 :-)