Subject | Re: [IBO] Record was not located to update. |
---|---|
Author | Helen Borrie |
Post date | 2001-11-13T11:51:07Z |
At 12:40 PM 13-11-01 +0100, Svein wrote:
MY_COLUMN=ITS_GENERATOR_NAME
If you want to, you can put all of your generators for the whole database into the GeneratorLinks property on the TIBODatabase. In this case you need to include the table identifier too:
ATABLE.MY_COLUMN=ITS_GENERATOR_NAME
Make sure your triggers check for null before deciding to fire a generator in a Before Insert trigger:
..
IF (NEW.MY_COLUMN IS NULL) THEN
NEW.MY_COLUMN = GEN_ID(ITS_GENERATOR_NAME, 1);
..
cheers,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Hi Omar!GeneratorLinks is just the same with the TDataset-based components. An entry looks like this:
>To do what you want to do, you have to assign the PK at the client side.
>IBO-wise this is normally done by using GeneratorLinks (I use the native
>components and don't know how GeneratorLinks is used with the TDataset
>components you seem to be using).
MY_COLUMN=ITS_GENERATOR_NAME
If you want to, you can put all of your generators for the whole database into the GeneratorLinks property on the TIBODatabase. In this case you need to include the table identifier too:
ATABLE.MY_COLUMN=ITS_GENERATOR_NAME
Make sure your triggers check for null before deciding to fire a generator in a Before Insert trigger:
..
IF (NEW.MY_COLUMN IS NULL) THEN
NEW.MY_COLUMN = GEN_ID(ITS_GENERATOR_NAME, 1);
..
cheers,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________