Subject | Re: [IBO] Increment Key from Delphi Grid |
---|---|
Author | mitch_landor |
Post date | 2006-03-01T04:58:25Z |
--- In IBObjects@yahoogroups.com, "Woody" <woody-tmw@...> wrote:
I'm only using IBODatabase, IBOTable, Datasource, DBGrid (so that I
can use 3rd party components).
Where would I edit the sql that is sent upon insert?
>server.
> ----- Original Message -----
> From: "mitch_landor" <mlq97@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Tuesday, February 28, 2006 9:23 PM
> Subject: [IBO] Increment Key from Delphi Grid
>
>
> > I have set up a Firebird table with a Before Insert trigger to
> > increment the "ID" key column which is integer type. This works OK in
> > the DB.
> >
> > I can read and edit the table from a Delphi grid, but when I try to
> > add a row I get an error message "Field ID must have a value".
> >
> > How can I get this to insert correctly from Delphi?
>
> Remove the field from the insert sql so that it isn't sent to the
> The better way is to set up the generator field property of theTIB_Query to
> set this value for you. The trigger should test the field for nulland only
> assign a generated value if it is null.Thanks Woody,
>
> HTH
>
> Woody (TMW)
>
I'm only using IBODatabase, IBOTable, Datasource, DBGrid (so that I
can use 3rd party components).
Where would I edit the sql that is sent upon insert?