Re: Changing A Btrieve index


Steven Blank
 

Sherm,

Ideally, yes - run only once.

But running it more than once won't hurt anything. Magic drops the old index by number and creates the new index as the index is defined in the Tables Repository. Running the program more than once will just drop and recreate the same index structure.

Benign redundancy.

Kinda like me.

Steve Blank

At 03:59 PM 1/24/2017, you wrote:
Steve,

If I understand you correctly, you would write just one program to do
this....and ensure that it's run only once, as the first action by the
first person who uses the new version.

?

Sherm


On 01/24/2017 06:55 PM, Steven Blank wrote:
Hi Jim,

Using the Reindex option for a program's Open mode will work ok - the index will be dropped and recreated when the program is executed; no data will be lost. However, you'll have to disable Check Definition for the Database beforehand. You can turn it back on after the file has been reindexed.

You could also achieve the same thing using the Btrieve Maintenance Utility. Open the Information Editor and get information for the file. Then use the Index menu's Drop... and Create... options.

Steve Blank

P.S. Come to think of it, you may run with CheckDef turned off all the time, in which case, never mind. ;)



At 03:03 PM 1/24/2017, you wrote:
Hi,

I use Magic 8.3 and Btrieve. I need to change an index on one of the databases. If I change an index on a database in a control file and then release the code with a program that does a “Reindex” when I open the file, will it reindex the database without exporting and importing the data? Or will it corrupt the file?

Jim Gelles
Membership Management Services
818/988-0008

Join main@magicu-l.groups.io to automatically receive all group messages.