Generators in DBExpress

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for InterBase & Firebird in Delphi and C++Builder
Post Reply
brakaman
Posts: 9
Joined: Mon 19 Feb 2007 20:52
Location: Spain

Generators in DBExpress

Post by brakaman » Wed 26 Mar 2008 21:40

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.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 27 Mar 2008 10:36

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.

brakaman
Posts: 9
Joined: Mon 19 Feb 2007 20:52
Location: Spain

Post by brakaman » Thu 27 Mar 2008 14:24

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

brakaman
Posts: 9
Joined: Mon 19 Feb 2007 20:52
Location: Spain

Post by brakaman » Thu 27 Mar 2008 20:29

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:

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 28 Mar 2008 08:22

There is 30 days trial period. You cannot use the driver after the trial period has expired.

Post Reply