Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Terry Bottorff
  Where is Terry Bottorff?
 Cheyenne
 Wyoming - United States
 Terry Bottorff
 To: Boudewijn Lutgerink
  Where is Boudewijn Lutgerink?
 Hoonaardstraat, Driel
 Netherlands
 Boudewijn Lutgerink
 Tags
Subject: RE: Primary Key
Thread ID: 22002 Message ID: 22077 # Views: 15 # Ratings: 0
Version: Visual FoxPro 7 Category: General VFP Topics
Date: Tuesday, April 08, 2003 2:37:03 PM         
   


> > If I have a table that has an integer field (ikey) and a character field (cname) and the integer field is the primary key. Is there a way in code to set the ikey field not to the primary key - append records - fill the ikey field with the appropriate key - set in code ikey back to the primary key? I know how to do everything but set the ikey field "not to a primary key field" and then "set it to a primary key field". TIA.
> >
> > Buffiie
>
> How do you deal with uniqueness violations. What I get from this Q is.
> I have a field that is a primary key.
> In code I want to change it to a non-primary (normal) key.
> After some hassling and fizzling I want to make it a primary key once more...
>
> but to answer your question, ALTER TABLE can do the trick.
>
> One more Q, what if that table is involved in a relation....
>
> Boudewijn LutgeĀ®ink
> Boudewijn.Lutgerink@foxite.com
> Experience is the knowledge you get immediately AFTER you actually needed it...

See reply to Eric. If you have further comments please do so. TIA.
Buffiie

COMPLETE THREAD

Primary Key Posted by Terry Bottorff @ 4/7/2003 1:25:42 PM
RE: Primary Key Posted by Eric den Doop @ 4/7/2003 1:59:25 PM
RE: Primary Key Posted by Terry Bottorff @ 4/8/2003 2:35:31 PM
RE: Primary Key Posted by Eric den Doop @ 4/8/2003 2:59:05 PM
RE: Primary Key Posted by Terry Bottorff @ 4/8/2003 5:45:14 PM
RE: Primary Key Posted by Boudewijn Lutgerink @ 4/7/2003 2:49:50 PM
RE: Primary Key Posted by Terry Bottorff @ 4/8/2003 2:37:03 PM