>hi gregory:
>-i have a table called te24
>-i have a table called te40
>-i have a view called ve24, based on table te24 and table te40
>-the code goes like this:
>
>sele ve24
>appe blank
>replace ve24.xx with lcvariable
>
>and the point is, that the program gets stuck at the append blank line
>it do not goes to the replace line, and the new register is never added
>to the ve24
>
>-i have another application where the newid code is not excecuted, until
> i try the tableupdate command
>
>thanks
hi Jose,
I have no idea why the prog gets stuck at the append blank, perhaps the NewId() cannot lock the record. Trace it with the debugger
To recap
(1) make sure that the base tables te24 and te40 are not buffered.
If necessary open the view in the load of the form
use ve24 in 0 nodata
=CursorSetProp('Buffering', DB_BUFOPTRECORD, 've24')
=CursorSetProp('Buffering', DB_BUFOFF, 'te24')
=CursorSetProp('Buffering', DB_BUFOFF, 'te40')
(2) the default value of the base table must call NextId()
(3) the Id field of the view should have a default value of 0 (no call to NextId())
=dbsetprop('ve24.Id', 'Field', 'DefaultValue', '0')
Now, the NextId will be called for the basetable when you do a tableUpdate()
Success,
Gregory