Article View: borland.public.interbase.sql
Article #11323Stored Procedures and Constraints
From: Eric Lewis
Date: Wed, 27 Nov 2002 16:12
Date: Wed, 27 Nov 2002 16:12
20 lines
1622 bytes
1622 bytes
IB 6.0 - NT2000 I have a Stored procedure that calls two other SPs. The first called procedure gets a generated number, inserts a new record into table "A" with that number, and passes the number back to the calling procedure. Then the next procedure called takes that number and inserts a new record into table "B" that has a constraint stating a Foreign Key related to table "A". When running the main procedure the following error occurs: violation of FOREIGN KEY constraint "VALUE_HAS_VALUE" on table "B" It seems to me that table "A" does not get a commit. So, the values do not exist for the constraint to validate. Any suggestions? Thanks for your time. -- Eric Lewis
Technical Details
Message-ID:
<3de4eeff$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114a0e,a909d41206a87b91,start X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2002-11-27 08:15:24 PST From: "Eric Lewis" <elewis@highergear.com> Newsgroups: borland.public.interbase.sql Subject: Stored Procedures and Constraints Date: Wed, 27 Nov 2002 10:12:36 -0600 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 207.241.62.158 Message-ID: <3de4eeff$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1038413567 207.241.62.158 (27 Nov 2002 08:12:47 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail