You have two choices:
If you remove the calculated fields, and default values from your table, the
problem goes away.
If you want to keep the calculated fields or default values, then you will
have to create a stored procedure that will return the next value of your
generator. In your Delphi application in the beforepost method of you TDataset , make a call
to a TStoredProce to get the next value from your generator through your
stored procedure. Put this value in your table before you post.
Here is an example of the stored procedure to get the value from the generator.
SHOW PROCEDURE getgen
Procedure text:
=============================================================================
begin
rvalue = gen_id(Gen,1);
END
Here is an example of the trigger:
CREATE TRIGGER SETVENUEID FOR VENUE
ACTIVE BEFORE INSERT POSITION 1
as
Begin
if (NEW.VenueID is Null) then
begin
execute procedure GetGen returning_Values NEW.VenueID;
end
end
^
hope this helps
--
Robert Schieck
-----------------------------------------------------------------------
MER Systems Inc.
Client/Server Development and Training using Delphi, InterBase and Oracle
InterBase page http://www.mers.com/interbase.html
udflib page http://www.mers.com/product.html
TDUG page http://www.mers.com/tdug.html -Toronto Delphi Users Group