Subject Re: [IBO] NULL and GENERATORS
Author Svein Erling Tysvaer
Marcus,

triggers are located at the server, whereas IB_Query belongs to the client.
In no way can an IB_Query know what happens at the server. Moreover, there
is probably no way to get the value - since it presumably is part of the
primary key.

To save yourself from even thinking about this, take advantage of
GeneratorLinks. This makes IBO obtain the number before inserting and shows
up nicely in all your fields.

Set

At 11:44 14.05.2003 +0100, you wrote:
>All,
>I have a table that holds references. It has two fields, code and
>description. Both fields are set to not null. I have a Before Insert
>trigger that states if the code is null an auto-generated number is used
>instead. The user can either enter a code or have the system auto-generate one.
>
>I have a delphi form with an IB_Query component on it. When I insert and
>post a record it stated that the code field is required. I change the
>column property in the IB_Query so that Not Null was false and blanks are
>NULL. Now when I add a record the code field is blank and nothing is
>auto-generated.
>
>What have I done wrong?
>
>Regards,
>Marcus.
>
>The information contained in this message or any of its attachments may be
>privileged and confidential, and is intended exclusively for the
>addressee. The views expressed may not be official policy, but the
>personal views of the originator. If you are not the addressee, any
>disclosure, reproduction, distribution, dissemination or use of this
>communication is not authorised. If you have received this message in
>error, we apologise for the inconvenience and request that you advise the
>sender by using the reply facility in your e-mail software then delete the
>message and any attachments from your mail and 'deleted messages'. All
>messages sent and received by BOOT Computers Limited are monitored for
>virus, high risk file extensions, and inappropriate content and can not
>therefore be considered secure for confidential information.
>
>[Non-text portions of this message have been removed]
>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>keyword-searchable FAQ, community code contributions and more !
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/