Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Drop Foreign Key NEED HELP

2 posts in Windows NT Last posting was on 2000-03-02 05:49:32.0Z
Charles Monts Posted on 2000-02-28 19:58:55.0Z
From: "Charles Monts" <gti4monts@erols.com>
Subject: Drop Foreign Key NEED HELP
Date: Mon, 28 Feb 2000 14:58:55 -0500
Lines: 23
Organization: Gusrdsman Technology, Inc.
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <dkCiNbig$GA.297@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: w228.z208037100.was-dc.dsl.cnc.net 208.37.100.228
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2490
Article PK: 1089942

Back in November I sent out the following and received no responses. We
still have the problem. Does anyone have any suggestions?

We have a Foreign Key on TableA reference to TableB

Tried using Sybase Central to Delete the Foreign key (Delete Key, Right
Click & Tool Bar "X")
All three ask "Do you want to delete.." and we respond YES
Refresh the folder and the Foreign Key reference is still there!

Tried the following SQL in SQL Advantage
ALTER TABLE TableA DROP CONSTRAINT TableB_FK
then issued sp_helpconstraint TableA the Foreign Key constraint is still
there!

We receive no messages and each approach looks like it worked.

Also tried copying the tables, dropping them & then re-create, but Sybase
will not allow dropping table because of Foreign Key constraints!

Any ideas short of copying, dropping and recreating the entire database ??


"Mark A. Parsons" <iron_horse Posted on 2000-03-02 05:49:32.0Z
Message-ID: <38BE00EC.25AADED4@compu_serve.com>
Date: Thu, 02 Mar 2000 18:49:32 +1300
From: "Mark A. Parsons" <iron_horse@compu_serve.com>
Organization: Pegasys Ltd
X-Mailer: Mozilla 4.61 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Drop Foreign Key NEED HELP
References: <dkCiNbig$GA.297@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 23
NNTP-Posting-Host: p354.ipa1-n8-16.iconz.net.nz 210.48.25.98
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2470
Article PK: 1089922


Charles Monts wrote:
>
> Back in November I sent out the following and received no responses. We
> still have the problem. Does anyone have any suggestions?
>
> We have a Foreign Key on TableA reference to TableB
>
> Tried using Sybase Central to Delete the Foreign key (Delete Key, Right
> Click & Tool Bar "X")
> All three ask "Do you want to delete.." and we respond YES
> Refresh the folder and the Foreign Key reference is still there!
>
> Tried the following SQL in SQL Advantage
> ALTER TABLE TableA DROP CONSTRAINT TableB_FK
> then issued sp_helpconstraint TableA the Foreign Key constraint is still
> there!

What happens if you go into isql and do this 'manually'? I'd suggest
doing the 'alter table ... drop constraint' approach from the isql
command line. Then verify it's gone via the isql command line.


--
Mark Parsons
Pegasys Ltd