Subject | Re: FK Violation |
---|---|
Author | Adam |
Post date | 2005-04-29T05:19:15Z |
OK,
I think my point is now moot because Helen has found something I
missed (well spotted).
The fact that your manual insert failed shows the problem has nothing
to do with your Stored Procedure, but rather the foreign key.
No triggers or other transactions, great one less thing.
As Helen pointed out.
BigInt is not Integer, change them so they are the same data type and
see if your problem vanishes. You can't fit a bigint inside a integer
field, so I am guessing this is a design oversight. It is probably a
good idea to create a domain something like:
CREATE DOMAIN MyID AS BIGINT NOT NULL DEFAULT -1;
Then change your table definitions to use these fields instead. (You
can create an equivalent without the NOT NULL to use in your foreign
keys if the relationship is unknown/undefined etc)
CREATE DOMAIN MyIDFK AS BIGINT DEFAULT NULL;
Adam
--- In firebird-support@yahoogroups.com, Grant Brown <grant@s...>
wrote:
I think my point is now moot because Helen has found something I
missed (well spotted).
The fact that your manual insert failed shows the problem has nothing
to do with your Stored Procedure, but rather the foreign key.
No triggers or other transactions, great one less thing.
As Helen pointed out.
BigInt is not Integer, change them so they are the same data type and
see if your problem vanishes. You can't fit a bigint inside a integer
field, so I am guessing this is a design oversight. It is probably a
good idea to create a domain something like:
CREATE DOMAIN MyID AS BIGINT NOT NULL DEFAULT -1;
Then change your table definitions to use these fields instead. (You
can create an equivalent without the NOT NULL to use in your foreign
keys if the relationship is unknown/undefined etc)
CREATE DOMAIN MyIDFK AS BIGINT DEFAULT NULL;
Adam
--- In firebird-support@yahoogroups.com, Grant Brown <grant@s...>
wrote:
> Hi Adam,record into
>
> >> Open up database work bench and try and manually insert a
> >> BUS_KEY_FEAT.think
>
> Did that - still got the same problem
>
> >> We really don't have enough information to trouble
> >> shoot for you, and it is difficult to grasp what you are trying
> >> without seeing some data in there.
>
> What information do you need ? I can send you the DB if required
>
> >> What are your triggers doing to your FK's?
>
> There are no triggers on the table being inserted to
>
> >> Is the foreign key referring to the tables and fields that you
> >> it is? (dont answer yes, check it again)
>
> yes
>
> >> Is there any other transaction that may have deleted the parent
> >> record that you can not see yet?
>
> NO
>
> --
> Regards,
> Grant Brown
>
> Product Development Manager
> Phone : 02 4229 1185
> Mobile : 0412 926 995
> Email : grant@s...
> Web : www.sitedoc.com.au
>
> SiteDoc - Easy to Use - Powerful Results