Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create a primary key
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00174961
Message ID:
00174973
Views:
26
>You can't have a Primary key with a FOR clause. You can use a candidate key instead.
>

You can have one, but it has to be created via the MODIFY STRUCTURE command manually. The following is partial output from DISPLAY STRUCTURE:
Processor is Pentium 
Current Database: E:\CARRIER INFORMATION TOOL\DATA\TEST.DBC           
Currently Selected Table:
Select area:  1, Table in Use:            E:\CARRIER INFORMATION TOOL\DATA\TEMP.DBF    Alias:   TEMP
            Code page:   1252 
  Structural CDX file:   E:\CARRIER INFORMATION TOOL\DATA\TEMP.CDX           
            Index tag:   PRIMARY             Collate: Machine          Key: TEST Primary      For: .NOT.DELETED()   
       Lock(s): Exclusive USE 
>>How can I create a primary key with a FOR clause (FOR !DELETED())
>>the code I`m using is:
>>
>>ALTER TABLE ceemcct ;
>>ADD PRIMARY KEY str(numero,4)+dtos(Data_ldemp)+str(n_via,4) tag NumeroData
>>
>>Thanks
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform