>>>>That's a problem since my parameter is an ID, which I don't know. E.g. I have a new record and I save it, how now can I refresh to show this AutoInc (default) value?
>>>
>>>Catch 22 :o)
>>>Native tables or other backend?
>>
>>Exactly! <g> Native VFP database. AFAIK, VFP9 has new function to retrieve AutoInc value. I was thinking, I should remove this field from my search form and the main form in VFP8 version. But the user already seen it <g>
>>
>>I don't see a solution to this problem. I was warned that AutoInc fields give nothing but the trouble <g>
>
>OK There where you Save The New record (and because this table is already here):
>(this is NOT TESTED at all, just on top of my head, I am not sure if this will works)
>
>DO WHILE NOT RLOCK([MainTable],[0])
> DOEVENTS
>ENDDO
>IF NOT TABLEUPDATE(1, .t., [YourCA])
> ....
>ELSE
> SELECT MAX(Id) AS Id FROM MyTable INTO CURSOR crsId
> YourCAParameter = crsId.Id
> CA.CursorRefresh()
>ENDIF
>UNLOCK IN MyTable
>
>With all IFs in proper places :-)
I see. I don't think I like it :( I have a generic save method, may be there is a way to return ID in some AfterUpdate method of CA?
If it's not broken, fix it until it is.
My Blog