Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create a primary key
Message
From
12/01/1999 07:26:55
 
 
To
12/01/1999 06:18:49
Carla Silva
Http - Produtos Informaticos, Lda.
Odivelas, Portugal
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00174961
Message ID:
00174971
Views:
25
>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
>

The last time I did this, the filter had to be added to the index manually through the MODIFY STRUCTURE command. After adding it to a simple table and running GENDBC against it, the following result was obtained under VFP 5 with the GENDBC noted below:

* *********************************************************
* *
* * 01/12/99 TEST.DBC 07:32:07
* *
* *********************************************************
* *
* * Description:
* * This program was automatically generated by GENDBC
* * Version 2.26.67
* *
* *********************************************************

****** These filters need to be added manually ******
* Table Name: TEMP
* Primary Key: TEST
* Filter Expression: .NOT.DELETED()
****************************************************
CLOSE DATA ALL
CREATE DATABASE 'TEST.DBC'

***** Table setup for TEMP *****
CREATE TABLE 'TEMP.DBF' NAME 'TEMP' (TEST C(50) NOT NULL)

***** Create each index for TEMP *****
SET COLLATE TO 'MACHINE'
ALTER TABLE 'TEMP' ADD PRIMARY KEY TEST TAG PRIMARY

***** Change properties for TEMP *****
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