Subject Re: Default values not defaulting for some field
Author ming
--- In IBObjects@yahoogroups.com, "ming" <ming2_id@...> wrote:
>
> hi
>
> i have a some field with set default value, like :
> LAST_UPDATE TIMESTAMP_1 DEFAULT current_timestamp NOT NULL
> LAST_USER VARCHAR30 DEFAULT current_user NOT NULL
>
> i test with ib_expert to add new record, the default value field run corectly.
>
> but when i develop with ibo 4.9.14 36, + delphi 2010
> getserverdefault=true
> the result last_update is corectly
> but the last_user is always null VALUE
>
> Is there another way to get the value of default server ?
>
> i try open dialog ib_query in tab fields says:
> last_update (timestamp) TIMESTAMP /* dv=current_tempstamp */
> last_user (vartext) varchar(30) /*cs=NONE */ /*dv=current_user */
>
> i think the difference cs=NONE. whats its mean cs=None ?
>
> thanks
>
> ming2
>
every field with varchar must be cs=none, the problem is getserverdefault is not working for some field.

i create a triger before post and before insert :
new.last_user = current_user;
new.last_update = current_timestamp;

it works, but i think solved my problem, but getserverdefault is useless