Subject Re: [firebird-support] Re: Non null column, before insert trigger not filling column, Delphi
Author Woody
Mike,

You shouldn't have to mess with field defs depending on what you are
using for query components in Delphi. If you use TIBQuery (IBX) components,
you can set the generator field to automatically get the next value for the
ID field. That way, it satisfies the not null constraint and the value is
immediately available to be used in the program.

HTH
Woody (TMW)

--------------------------------------------------
From: "Mike" <mike@...>
Sent: Tuesday, June 15, 2010 7:47 AM
To: <firebird-support@yahoogroups.com>
Subject: [firebird-support] Re: Non null column, before insert trigger not
filling column, Delphi

>
>
> Well, Dimitry, it depends on what one's objectives are. I'm converting the
> database from Jet to Firebird of an application that is installed and
> running on 400 client sites. I would like to convert the database with
> only the minimal essential changes to the programs that use it. It's
> certainly possible to insert an event handler to change the required
> setting of a FieldDef for every dataset for every non-null field that has
> a generator, but that would mean touching probably 50% of the programs in
> the application.
>
> In any case, wouldn't I have to create the explicit FieldDef through the
> IDE anyway? If so, then wouldn't it be sufficient to set its Required
> property directly.
>
> I'm not sure if your reply was intended to be sarcastic or not. I've taken
> it on it's face value, that is, it was intended to be helpful. If so,
> thank you very much.
>
> Best regards,
>
> Mike Watson
> Datos Informatica
>
>
>
>
> --- In firebird-support@yahoogroups.com, Dimitry Sibiryakov <sd@...>
> wrote:
>>
>> 15.06.2010 13:57, Mike wrote:
>> > But the FieldDefs are implicitly created with Required = True from the
>> > non-null column definition of the database. This means that I will have
>> > to create in my Delphi programs an explicit FieldDef for each usage of
>> > the non-null column (in all datasets, etc.) and change the Required
>> > setting to False.
>>
>> Does it mean that you don't know how to write "Required := false;" in
>> your program code (in OnAfterOpen event handler, for example)?.. Are you
>> a mouse-only style programmer?..
>>
>> --
>> SY, SD.
>>
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>