dbTalk Databases Forums  

Create Specific Index Number

comp.databases.btrieve comp.databases.btrieve


Discuss Create Specific Index Number in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jim Chaffee
 
Posts: n/a

Default Create Specific Index Number - 09-22-2004 , 08:19 PM






Does anyone know how to specify a specific index number when issuing
the Create Index (31) Btrieve command through the API? It seems that
whatever key I specify, it always creates the index as the next
available index number. Thanks for you help!

Reply With Quote
  #2  
Old   
Guy Dawson
 
Posts: n/a

Default Re: Create Specific Index Number - 09-23-2004 , 08:00 AM






Jim Chaffee wrote:
Quote:
Does anyone know how to specify a specific index number when issuing
the Create Index (31) Btrieve command through the API? It seems that
whatever key I specify, it always creates the index as the next
available index number. Thanks for you help!
IIRC, we had the same problem. We ended up creating sacrifical indices
and then deleting them after creating the index we wanted.

Taking a file with indices 0,1 and 2 on which we want to creat index 4,
we create a sacrifical index 3, create the index we want as 4 and then
delete index 3.

Not pretty but it worked.

Guy
-- --------------------------------------------------------------------
Guy Dawson I.T. Manager Crossflight Ltd
gnues (AT) crossflight (DOT) co.uk


Reply With Quote
  #3  
Old   
Bill Bach
 
Posts: n/a

Default Re: Create Specific Index Number - 09-23-2004 , 04:46 PM



From the Developer's Kit Manual...

To assign a specific Key Number to the key being created, add the
desired key number to 0x80, and place the sum in the Key Number
parameter. If you are rebuilding the system-defined log key (also called
system data), specify 0xFD (that is, key number 125 plus 128).

--------------------------------------------------------------------------------

Note
Key numbers must be unique to the file. They must also be valid. (The
value of each key number must be less than the maximum number of key
segments allowed for the file's page size.)

HTH...
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***
Chicago: November 16-19, 2004: See our web site for details!


Jim Chaffee wrote:

Quote:
Does anyone know how to specify a specific index number when issuing
the Create Index (31) Btrieve command through the API? It seems that
whatever key I specify, it always creates the index as the next
available index number. Thanks for you help!


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.