Subject RE: [IBO] Generators and row selections
Author Don Schoeman
Hi Norman, the trigger doesn't check for a null value before inserting the
new value. The generator looks like this:
CREATE GENERATOR "CUST_ID_GEN";

and the trigger looks like this:

CREATE TRIGGER "SET_CUST_ID" FOR "CUSTOMERS"
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
NEW.CUST_ID = GEN_ID(CUST_ID_GEN, 1);
END

I also have the IBO GeneratorLinks property set to retrieve the generator
value.
CUST_ID=CUST_ID_GEN

-Don



-----Original Message-----
From: Norman Dunbar [mailto:ndunbar@...]
Sent: 07 August 2001 10:58
To: 'IBObjects@yahoogroups.com'
Subject: RE: [IBO] Generators and row selections


Don,

dunno about your first problem :o(

Your second, do you have a trigger on the database which inserts a generated
number into the PK field, but the trigger doesn't check for a null value
before inserting the new value ?

Regards,
Norman.

----------------------------------------------------------------------------
----
Norman Dunbar EMail: NDunbar@...
Database/Unix administrator Phone: 0113 289 6265
Lynx Financial Systems Ltd. Fax: 0113 201 7265
URL: http://www.LynxFinancialSystems.com
----------------------------------------------------------------------------
----


-----Original Message-----
From: Don Schoeman [mailto:ds@...]
Sent: Tuesday, August 07, 2001 9:52 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] Generators and row selections


>> I have two problems:

<SNIP>




Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/