Page 1 of 1

Generators in DBExpress

Posted: Wed 26 Mar 2008 21:40
by brakaman
How work with the generators?

After the method ApplyUpdates, increases the number is not shown.....

And how use it Before., After...

But after closing and opening the conexion again shows. OK

Sorry for your time.

Regards.

Posted: Thu 27 Mar 2008 10:36
by Plash
Please specify whether a trigger is used to set field value from the generator. If so, you should call Refresh method of dataset after ApplyUpdates to get new values.

You can call Refresh method from AfterApplyUpdates event handler.

Posted: Thu 27 Mar 2008 14:24
by brakaman
Plash wrote:Please specify whether a trigger is used to set field value from the generator. If so, you should call Refresh method of dataset after ApplyUpdates to get new values.

You can call Refresh method from AfterApplyUpdates event handler.
Hi Plash thanks for your interest.

Here he generator code

Code: Select all

SET SQL DIALECT 3;

SET NAMES ISO8859_1;

CREATE GENERATOR GEN_BANCOS_ID;

SET TERM ^ ;


CREATE OR ALTER TRIGGER BANCOS_BI FOR BANCOS
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
  IF (NEW.CODBANCO IS NULL) THEN
    NEW.CODBANCO = GEN_ID(GEN_BANCOS_ID,1);
END
^


SET TERM ; ^
Work fine with IBX Components and not work in your Query Demo. and if after click button Applyupdates i pulse Refresh button the project crashes

Posted: Thu 27 Mar 2008 20:29
by brakaman
Thanks Plash the problem is fixed


After call "Refresh" method of Dataset, is incremented code and is show correctly.

By the way... the trial version what type of protection has?

I not see anything :twisted:

Posted: Fri 28 Mar 2008 08:22
by Plash
There is 30 days trial period. You cannot use the driver after the trial period has expired.