> From: Ed Leafe <[EMAIL PROTECTED]>
> 
> On Jul 21, 2006, at 9:05 AM, Lew Schwartz wrote:
> 
> > ... But it does, at least as far as the dropping of tags is concerned.
> 
>       That's a side-effect of what looks like some sloppy programming.  
> Most of the VFP SQL commands translate the request behind-the-scenes  
> to regular Xbase-style commands. I'm sure that the command you cite  
> deletes the tag and removes the FK record in the DBC. If it were  
> implemented better, it should throw an error that no such FK exists.
> 
>       Real SQL databases have a DROP INDEX command, which VFP doesn't  
> implement. Maybe you should pass this on to the VFPx gang.

Funny but his code was alos on a free table and not part of a DBC.  I
have no idea if it matters.  Here is code that determines if the key is
valid and then deletes the PKey.  Keys are constraints.   

USE [ASPState]
GO
/****** Object:  Index [PK__ASPStateTempAppl__5BE2A6F2]    Script Date:
07/21/2006 08:43:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysindexes 
WHERE id = OBJECT_ID(N'[dbo].[ASPStateTempApplications]') 
AND name = N'PK__ASPStateTempAppl__5BE2A6F2')

ALTER TABLE [dbo].[ASPStateTempApplications] DROP CONSTRAINT
[PK__ASPStateTempAppl__5BE2A6F2]



_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to