Subject | Re: [IBO] BufferSynchroFlags don't work |
---|---|
Author | Radovan Antloga |
Post date | 2001-10-20T18:58:18Z |
Hi Artur Anjos
For test I'm using DbGrid because it is easy to use than DeveloperExpress grid.
I have KeyLinks property with ID and KeyLinksAutoDefine=False also in
GeneratorLinks I have ID=gID. I have trigger as Helen suggested but I still can't
see new record after post because record disappears. I can send you example.
Thanks for your answer!
Regards
Rado Antloga
I'm also using Developer and it's ok. What do you have to check:
a) On your TIBOQuery, check the Keylinks property. I will assume for this example that 'ID' is your keylink. So, put 'ID' on your Keylink property and set KeyLinksAutoDefine to False. Also in TIBOQuery, set the GeneratorLinks property to something like ID=YourGeneratorName.
b) On your 'before insert' trigger, check for Null Value:
CREATE TRIGGER bla bla BEFORE INSERT AS
IF( ID IS NULL)THEN
ID=GEN_ID(YourGeneratorName,1);
...
Note on this trigger: that's not necessary at all for this example. The value ID will never be null, because IBO will take care of that. So, that's a good practice to put this code, because it will only run if you are inserting rows outside your application.
c) On your Quantum Grid, set KeyField to ID. This is need if you will use "Load All Records" on your Quantum Grid.
That's all. I hope it helps.
Artur Anjos
[Non-text portions of this message have been removed]
For test I'm using DbGrid because it is easy to use than DeveloperExpress grid.
I have KeyLinks property with ID and KeyLinksAutoDefine=False also in
GeneratorLinks I have ID=gID. I have trigger as Helen suggested but I still can't
see new record after post because record disappears. I can send you example.
Thanks for your answer!
Regards
Rado Antloga
I'm also using Developer and it's ok. What do you have to check:
a) On your TIBOQuery, check the Keylinks property. I will assume for this example that 'ID' is your keylink. So, put 'ID' on your Keylink property and set KeyLinksAutoDefine to False. Also in TIBOQuery, set the GeneratorLinks property to something like ID=YourGeneratorName.
b) On your 'before insert' trigger, check for Null Value:
CREATE TRIGGER bla bla BEFORE INSERT AS
IF( ID IS NULL)THEN
ID=GEN_ID(YourGeneratorName,1);
...
Note on this trigger: that's not necessary at all for this example. The value ID will never be null, because IBO will take care of that. So, that's a good practice to put this code, because it will only run if you are inserting rows outside your application.
c) On your Quantum Grid, set KeyField to ID. This is need if you will use "Load All Records" on your Quantum Grid.
That's all. I hope it helps.
Artur Anjos
[Non-text portions of this message have been removed]