Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2002
    Location
    New Delhi, India.
    Posts
    9

    Arrow Unanswered: *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

  2. #2
    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
    **********************************************
    The *Btrieve error 6* has started bugging me longer than expected.. any input would be really appreciated!

  3. #3
    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •