Subject [IBO] Re: Default values not defaulting for some field
Author ming
tcontact have a field, here the ddl:
CONTACT_ID INTEGER_1 NOT NULL /* INTEGER_1 = INTEGER */,
TITLE_NAME VARCHAR10 /* VARCHAR10 = VARCHAR(10) */,
FIRST_NAME VARCHAR20 NOT NULL /* VARCHAR20 = VARCHAR(20) */,
LAST_UPDATE TIMESTAMP_1 DEFAULT current_timestamp /* TIMESTAMP_1 = TIMESTAMP */,
LAST_USER VARCHAR30 DEFAULT current_user /* VARCHAR30 = VARCHAR(30) */,

or
CONTACT_ID INTEGER_1 NOT NULL /* INTEGER_1 = INTEGER */,
TITLE_NAME VARCHAR10 /* VARCHAR10 = VARCHAR(10) */,
FIRST_NAME VARCHAR20 NOT NULL /* VARCHAR20 = VARCHAR(20) */,
LAST_UPDATE TIMESTAMP_1 DEFAULT current_timestamp NOT NULL /* TIMESTAMP_1 = TIMESTAMP */,
LAST_USER VARCHAR30 DEFAULT current_user /* VARCHAR30 = VARCHAR(30) */,

IB_QUERY.TEXT=
SELECT * FROM TCONTACT FOR UPDATE

field 'last_update' no problem in default value has always show the value, but field 'last_user' always null value
i think the value Will overwrite with null value

so the minor change
IB_QUERY.TEXT=
SELECT Contact_id,title_name,first_name,last_update FROM TCONTACT FOR UPDATE

this is the only fix, but how to show the user the record update from who

thanks for your support


regrads

ming

--- In IBObjects@yahoogroups.com, "IBO Support List" <supportlist@...> wrote:
>
> Will you please send me a working sample app so that I can see your issue
> first-hand?
>
> Jason
>
> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
> Of ming
> Sent: 31 January 2012 04:00 PM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] Re: Default values not defaulting for some field
>
> hi all
>
> my problem for default value still error in ibo even i use the newest ibo,
> any sugestion for my problem?
>
> because the trigger can be alternative but i think not eficient for every
> table i must add before insert for 1 field only type data varchar.
>
> Need solution, any body help me please...
>
>
> --- 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
>