General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>Right, but why the DEFAULT is an assign value ?
>>
>
>Because, based on the content of the record, the field was assigned a value. I am sure there are many scenarios when someone would want DEFAULT value to be sent to the remote source. One of them was discussed on this thread.
>
this is certainly true, but the contrary is true too.
This involves that the scenery where default has state = "3" (mines choice)
it is simple to be implemented ( CA call BeforeCursorUpdate ... ),
vice versa, that actual (your choice) default state = "4" it becomes very complicated.
>
>>another issue is this,
>>because DEFAULT is done as an update operation,
>>OLDVAL and CURVAL return NULL for a not nullable field,
>
>Interesting conclusion. I can assure you that behavior of CURVAL/OLDVAL has nothing to do with how DEFAULT behaves. No relation, what soever. CURVAL/OLDVAL is not defined for a new record, that is why the result is NULL. Also, these functions are not designed to judge about field's type/nullability based on their result.
I agree, NULL is ambiguous in this case
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only