Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a regular index instead of candidate?
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01111314
Message ID:
01111364
Views:
13
>Hi there!
>
>I'm deploying a patch to modify an existing application so my users will be able to choose themselves to "primary" key for a record instead of having the app select the first one sequentially available. (dont ask why...)
>
>My original DB had a primary index on that key, so I drop it, then create a new one transparently like so:
>
>
>LOCAL leDropPK as Exception
>ALTER table tblGroupes drop PRIMARY key
>USE tblGroupes EXCLUSIVE
>SELECT tblgroupes
>INDEX on id_grp TAG id_grp ascending
>REINDEX
>USE
>
>
>Problem is, when I try that bit in the code window in VFP development environnement, it works fine, but when I use the same code in my app, it creates a "candidate" key instead of a "regular" one...
>
>Any idea why that is?

Sorry for the unrelated comment, but it looks like the USE exclusive is in the wrong place. It should be before ALTER TABLE.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform