Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with indexes..
Message
From
01/04/2000 16:33:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
01/04/2000 16:29:21
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00353958
Message ID:
00353960
Views:
20
>I have a database with several tables, the tables have principal indexes, but when I want to add a record with a key value that exist but is deleted,i can't because the key must be unique.How can I solve this problem ?


You could add a filter to index expression "for !deleted()". But this is not supported in utilities like gendbc.prg. (I sense your key is integer) Instead you could make a simple trick and replace deleted ones with their negative values :
replace pk with pk*-1 for deleted()
Later you could add :
replace pk with pk*-1
to your delete routine.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform