>>>
>>>Right. I've determined, that in time of APPEND BLANK the current alias is indeed the table, we're appending. So, here is the changed function (I also changed name of NextID to FunLibID to avoid possible errors):
>>
>>Append blank - yes
>>Under all scenarios - no
>>
>>Supply uniqueid in default().
>>Cetin
>
>What could be other scenarios? Yes, I have default value to be GetNextID('AllFunctions'). Do you think, it would not work for insert ? Or for manual invokation of this procedure? Yes, haven't thought of that. Ok, now I need something more sophisticated again... :)
No the problem is you have much more sophisticated thing than needed :)
It would work for append blank, insert, view insertion, command window, browse Ctrl+Y etc if simply is default value and not explicitly a value is provided. It's in DBC's stored procedure, right ? If so DBC knows itself and its ID table. Even if there is a GetNextID.prg around stored procedure takes presedence. So it would call its own DBC procedure which already knows its name and tables. You're in danger only if you have more than one table using the same default literally.
Cetin