If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > *Btrieve Error 6*

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-04-02, 05:21
shamsham shamsham is offline
Registered User
 
Join Date: Feb 2002
Location: New Delhi, India.
Posts: 9
Arrow *Btrieve Error 6*

Hi,

I tried creating tables from a Btr file and it got created fine inheriting the structure and data from the btr file.

But when I try creating indexes in the newly created table, the SRDE seems to throw an ODBC error:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ODBC Error: SQLSTATE = S1000, Native error code = -4993
The key number parameter is invalid(Btrieve Error 6)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I had looked up for the Btrieve Error 6 and it says:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6: The key number parameter is invalid
The value stored in the key number parameter is not valid for the file being accessed. The key number must correspond to one of the keys defined for the file. Valid key numbers are 0 through 118.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now, since am new to PSQL and Btrieve, I am not really sure what a *key number parameter* is... and where in the Btrieve file is it maintained?

and what would be the solution for this problem?

Thanks for the help thats on its way...
Sham
Reply With Quote
  #2 (permalink)  
Old 03-05-02, 02:28
shamsham shamsham is offline
Registered User
 
Join Date: Feb 2002
Location: New Delhi, India.
Posts: 9
more inputs...

I tried the option using the PCC to create tables. I had created a table using the 'Create table wizard...' from its corresponding btr file (naming index fields, split the unnamed columns etc.) and the table got created just fine. But then again when I tried to add indexes from the 'Edit Table Design' option, and save the indexes I added, I get a 'Btrieve Error 6'.
I had then selected 'Tools > Options' and unchecked the 'Table Link Mode' check box. This resulted in the successful creation of the indexes in the Index.DDF file. But running the Consistency test on the Database still failed. This time the failure was due to the following...

**********************************************
Index Offset Inconsistency.
The dictionary index 1 seg 0 indicates 0 (Column = 'FIELD_1')
The data file index 1 seg 0 indicates 233
Index Length Inconsistency.
The dictionary index 1 seg 0 indicates 6 (Column = 'FIELD_1')
The data file index 1 seg 0 indicates 1
Index Offset Inconsistency.
The dictionary index 1 seg 1 indicates 233 (Column = 'FIELD_6')
The data file index 1 seg 1 indicates 0
Index Length Inconsistency.
The dictionary index 1 seg 1 indicates 1 (Column = 'FIELD_6')
The data file index 1 seg 1 indicates 6
**********************************************
Quote:
The *Btrieve error 6* has started bugging me longer than expected.. any input would be really appreciated!
Reply With Quote
  #3 (permalink)  
Old 03-19-02, 20:12
BrendtHess BrendtHess is offline
Registered User
 
Join Date: Jan 2002
Posts: 10
Lightbulb

Are you using the original physical data file, or did you create the file from scratch and load in the data?

If you are using the original file, then the original indexes are still a part of that file. You can check that by loading the Maintenance utility (Start/Programs/Pervasive/Utilities/Maintenance Utility) and opening the physical data file (Options / Show Information Editor, then Load Information and select the file.)

Look down in the Key section of the screen (Center, near the bottom). Anything in the Key section indicates existing indexes in the physical file. You can delete these keys (using Index/Drop off of the menu). Once you have done that, you can re-create the indexes with the proper definitions in PCC.
__________________
Brendt

We are the music makers, and We are the dreamers of dreams...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On