Error: Primary key for row in table 'x' is referenced by foreign key 'f' in table 'y' - and 'f' is cascaded for update ?

(ASA 9 newest ebf)

I'm getting this error even though mentioned foreign key has cascade updates
(and deletes too) enabled.
Is this some new behaviour in asa 9, or why can i get such message for
cascaded foreign key? Any ideas?
Thanks

Pete


0
Peter
1/22/2004 1:06:55 PM
sybase.sqlanywhere.general 32637 articles. 4 followers. Follow

4 Replies
917 Views

Similar Articles

[PageSpeed] 30

Found a reason for it...but should it really work so? It's this way:

- table a has columns a,b,c
- table b has columns a,c, and references columns a,c (with a,c) in table a
with cascade updates
- table a hes before update trigger to change columns a when column b is
changed (set new_row.a = ...)

and that set new_row.a = ... in before update trigger does NOT fire cascade
update for b(a,c)->a(a.c) refrence!
isnt this a bug?

Pete


0
Peter
1/22/2004 2:05:29 PM
Has the RI_TRIGGER_TIME option been changed to 'BEFORE'?

On 22 Jan 2004 06:05:29 -0800, "Peter Beno" <pete_beno@hotmail.com>
wrote:

>Found a reason for it...but should it really work so? It's this way:
>
>- table a has columns a,b,c
>- table b has columns a,c, and references columns a,c (with a,c) in table a
>with cascade updates
>- table a hes before update trigger to change columns a when column b is
>changed (set new_row.a = ...)
>
>and that set new_row.a = ... in before update trigger does NOT fire cascade
>update for b(a,c)->a(a.c) refrence!
>isnt this a bug?
>
>Pete
>

--
bcarter@risingroad.com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com
0
Breck
1/22/2004 2:25:01 PM
> Has the RI_TRIGGER_TIME option been changed to 'BEFORE'?

No nobody changed it, it is still After, i just checked.


0
Peter
1/23/2004 8:44:46 AM
Yes, it looks like ON UPDATE CASCADE processing is only executed if
the primary key is explicitly mentioned in the SET clause.

I am posting a description in a new thread, to get folks attention :)

Breck

On 23 Jan 2004 00:44:46 -0800, "Peter Beno" <pete_beno@hotmail.com>
wrote:

>> Has the RI_TRIGGER_TIME option been changed to 'BEFORE'?
>
>No nobody changed it, it is still After, i just checked.
>

--
bcarter@risingroad.com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com
0
Breck
1/23/2004 1:01:43 PM
Reply:

Similar Artilces:

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

'''''
Name: mario Email: ramar17atfastwebnetdotit Product: Gran Paradiso Alpha 2 Summary: ''''' Comments: K: Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2) Gecko/20070206 GranParadiso/3.0a2 ...

please help: no primary key for foreign key '?' in table '?'...
when i try to do a DELETE TESTEDOCUMENTI WHERE TIPODOC='FTM'; i get the error no primary key for foreign key '?' in table '?'... what does it mean? (3 weeks ago i did a rebuild of the db because it was corrupted) i work with SA 5.5.05 the db structure i quite complex but if help CREATE TABLE "Admin"."RigheDocumenti" ( "AnnoDoc" smallint NOT NULL DEFAULT 0, "TipoDoc" varchar(3) NOT NULL, "NumeroDoc" integer NOT NULL, "Bis" varcha...

'do' won't 'do' if '/'
Greetings to All from Au, Have a NetWare Perl 5.8.4 and wanted to tweak File\Spec\NW.pm to try and standardise on '/' separators. If I run a test script (t/uni/lower.t) with an unmodified NW.pm, it calls t/uni/case.pl, that, in case.pl, (when the path separators are '\'), the $file is '..\lib\unicore\To\Lower.pl' and the following code portion works, with $simple getting a returned table: sub casetest { my ($base, $spec, $func) = @_; my $file = File::Spec->catfile(File::Spec->catdir(File::Spec->updir, "lib", &qu...

'''
Name: L Lachowsky Email: e2brutus_10atyahoodotcom Product: Firefox Summary: ''' Comments: why duddn this surprise me... I change default server from IE to Mozilla, and then i get error messages. well, shud I decide to not get on my computer with Mozilla..or shud I risk security breeches with IE....hmmm at least i can get on the internet with IE Browser Details: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this fee...

No primary key value for foreign key 'ISYSTABCOL' in table 'ISYSCOLPERM'
Hi all, running SA 10.0.1.3686 and .3712 on Win 2003 Server SP1. The above message appears when I try to add a column to a table. It's just a simple one: alter table dbo.T_MaZuGavAktion add fkz_BeilageNrLautVersand int check (@Wert > 0) null; There is a view based on this table, and several users have been granted update column rights on this view. It is only possible to execute the "ALTER TABLE ADD column null" statement when I revoke the update column rights from the view before (and re-grant them afterwards). That happened once in the past week...

Cast from type ''''DBNull'''' to type ''''String'''' is not valid.
How do I avoid getting this error: Cast from type ''''DBNull'''' to type ''''String'''' is not valid. I am trying to get values from the database into a form for updating using a Datareader, SQL is set to allow nulls for certain fields as they are not required but the only way I can get the form to display is by adding a space in SQL. Is there another way around this? Check if it is equal to DBNull.Value first and if it is, don't do the cast.Stanley Tan theSpoke Blog Where in the code does it need to go? I am using the following and it's the profile that isn't always requi...

table_info('','','','%') cannot return any types
I was recently confirming table_info special cases and discovered the case for getting table_types cannot work. table_info('','','','%') should return a list of table types but it returns a list of empty strings instead: my @types = $h->tables('', '', '', '%'); print "all types:\n", join("xxx\n", @types), "\n"; # should output something like: # "dbo" # "INFORMATION_SCHEMA" # "sys" # and actually outputs: xxx xxx It seems to be down to the following ...

'IN' Clause or 'OR'
Hello, [1]: select * from TABLEA where COL1 IN('value1','value2''valu3'....) [2]:select * from TABLEA where COL1 = 'value1' OR COL1= 'value2' OR COL1='valu3'. TABLEA is a huge table and it has non-clustered index on COL1. Among the above 2 queries, which query will give me the better performance or fast response and WHY? What is the difference between 'IN' and 'OR' clauses as for as Sybase Optimization is concerned. Which is the better one to be used on huge tables. Thanks. Mac An IN list is treated ...

'b'..'a'
Hello. I'm using defferent 5.6.0's for Win32. I wonder wheter following behaviour is intentional or not: d:\>perl -e "print 'b'..'c'" bc d:\>perl -e "print 'b'..'a'" bcdefghijklmnopqrstuvwxyz I expected empty list in latter case, like in perl -e "print 'bb'..'a'" <!ENTITY Vadim REALLIFE "Vadim V.Konovalov, St.Petersburg, Russia"> &Vadim; On Wed, Sep 20, 2000 at 03:14:41PM +0400, Konovalov, Vadim wrote: > Hello. > > I'm using defferent 5.6.0'...

'or' or 'union'
Hello I was just wondering, in general what is better to use, an 'or' clause in a select or a 'union' to join two selects together. Do both statements create work tables? Many thanks Alex I think OR will be better than union. because suppose u have 3 tables and using OR u can join table a and table b and table c so each table will have only one read. but using union you will join table a and table b and in another query of union u will use table (a or b) and table c so ur one read is more in union . Ramdas Alex Cheung wrote: > Hello > >...

LINQ -- how to do where x in ('a', 'b','c')
How do I write a LINQ expression that does the following: select * from SomeTable where SomeColumn in ('a', 'b','c')  Jay There is no IN operator in LINQ (yet), but you can use Contains instead: http://www.devauthority.com/blogs/jwooley/archive/2007/08/06/69922.aspx Jos...

Key 'd' and Key 'Control'
Dear sirs / madams, I want to add a short cut key in my datawindow, the script as shown as below, Script 1 IF KeyFlags = 2 THEN IF KeyDown(Keyd!) THEN THIS.TriggerEvent("ue_deleterow") END IF END IF Script 2 IF KeyDown(KeyControl!) then IF KeyDown(Keyd!) then THIS.TriggerEvent("ue_deleterow") END IF END IF Script 3 IF KeyDown(KeyControl!) AND KeyDown(Keyd!) THEN THIS.TriggerEvent("ue_deleterow") END IF But, all of the above, if I press the Key 'Control' first, and then press Key 'd',...

'Value' should be between 'minimum' and 'maximum'.
I'm attempting to invoke with parameters:  Dim thing2 As New mydelsubPBStep(AddressOf pbStep) Me.Invoke(thing2, "setMax", dt.Rows.Count)      <---- this is where the error occurs   the delegate looks like this: Private Delegate Sub mydelsubPBStep(ByVal mode As String, ByVal value As Integer)   the function it's calling looks like this:Private Sub pbStep(ByVal mode As String, ByVal value As Integer) Select Case mode.ToLower Case "clear" ProgressBar1.Value = 0 Case "step" ProgressBar1.PerformStep() L...

Web resources about - Error: Primary key for row in table 'x' is referenced by foreign key 'f' in table 'y' - and 'f' is cascaded for update ? - sybase.sqlanywhere.general

Resources last updated: 1/22/2016 6:21:03 PM