>>Check Re: Auto Refresh Key fields after insert with CA Thread #
1100805 Message #
1101047>
>The Message #
956056 link in the above message is most complete & comprehensive. I have understood that the following needs to be done:-
>
>?"1) Refresh IDENTITY field using [SELECT @@IDENTITY] command"
>oCA.InsertCmdRefreshFieldList="f_IDENTITY"
>oCA.InsertCmdRefreshCmd="SELECT @@IDENTITY"
>
>
>Will that update my VFP cursor?
>
>I need some help with my class. I tried the following on CA class built using Mark E. McCasland's builder :-
>
>lAutoRefreshNewRecords= .T.
>lUseDefaultRefreshCmd= .F.
>
>cInsertCmdRefreshFieldList= acbalid
>
> _BuildDefaultRefreshCmd method as
>
>TEXT TO THIS.InsertCmdRefreshCmd TEXTMERGE NOSHOW PRETEXT 10
> SELECT @@IDENTITY
>ENDTEXT
>
>
>The above in theory should work but I must have done something wrong. Any help from anyone is welcome.
>
>>There is also a nice article at
http://www.foxclub.ru/articles/index.php?id=46#CursorAdapter, but unfortunately, in Russian.
>
>I wish my russian was better. :)
Did you get any ID in the field? Was it wrong or nothing? Do you have triggers for your tables?
If it's not broken, fix it until it is.
My Blog