Index Numbers in btrieve tables importing into P.SQL 2000 SP2A

Index Numbers in btrieve tables importing into P.SQL 2000 SP2A

Post by Guy Dawso » Wed, 07 Mar 2001 23:35:30



Hi,

I have a btrieve file with indices numbered

        0, 2 and 5

and because of the legacy nature of existing code that uses them I
cannot change the index numbers.

What is the best way to use the Pervasive Control Center to create
DDFs for the file so that it can be accessed via SQL?

As far as I can see, using the advanced mode of the PCC, the indices
will be detected but the fact that they are numbered 0, 2 and 5 will
not. The PCC will create DDF entries for the btrieve file but number
the indices are 0, 1 and 2.

When I then attempt to access the file through P.SQL I get btrieve
error 6 - the key number parameter is invalid.

It sounds like a bug in PCC to me...

Any one know the solution?

TIA,
Guy
-- --------------------------------------------------------------------
Guy Dawson                    I.T. Manager              Crossflight Ltd

 
 
 

Index Numbers in btrieve tables importing into P.SQL 2000 SP2A

Post by Guy Dawso » Thu, 08 Mar 2001 00:42:56


Just to answer my own post after some more testing...

It looks like the answer is to delete the indexes by entering

        drop index table.index

SQL directly into PCC rather than using the PCC design software.

The drop index command does not cause the re-numbering of the indices.

So the procedure is

        create a clone of the btrieve table you wish to import
                with no indices

        use the PCC wizard to import the table

        use SQL in PCC to create indicies

                create index_0 as needed
                create index_1 as anything
                create index_2 as needed
                create index_3 as anything
                create index_4 as anything
                create index_5 as needed

                drop index table.index_1
                drop index table.index_3
                drop index table.index_4

You will now be left with a P.SQL DDF definition for the btrieve file
which will only have index definitions for index 0,2 and 5.

Guy
-- --------------------------------------------------------------------
Guy Dawson                    I.T. Manager              Crossflight Ltd


 
 
 

Index Numbers in btrieve tables importing into P.SQL 2000 SP2A

Post by Bill Bac » Thu, 08 Mar 2001 04:49:16


Sounds like a bug which needs to be fixed, if you ask me.  It should be
possible to also manually tweak the DDF's, but your solution is MUCH more
elegant -- and easier.
 Goldstar Software Inc.
 Building on Btrieve(R) for the Future(SM)
 Bill Bach

 www.goldstarsoftware.com
 *** Pervasive.SQL Service & Support Classes ***
 Chicago: April 9-12, 2001 - See our web site for details!

> Hi,

> I have a btrieve file with indices numbered

>         0, 2 and 5

> and because of the legacy nature of existing code that uses them I
> cannot change the index numbers.

> What is the best way to use the Pervasive Control Center to create
> DDFs for the file so that it can be accessed via SQL?

> As far as I can see, using the advanced mode of the PCC, the indices
> will be detected but the fact that they are numbered 0, 2 and 5 will
> not. The PCC will create DDF entries for the btrieve file but number
> the indices are 0, 1 and 2.

> When I then attempt to access the file through P.SQL I get btrieve
> error 6 - the key number parameter is invalid.

> It sounds like a bug in PCC to me...

> Any one know the solution?

> TIA,
> Guy
> -- --------------------------------------------------------------------
> Guy Dawson                    I.T. Manager              Crossflight Ltd


 
 
 

1. P.SQL 2000 on Netware SP2a

Hi,

I am trying to add a server dsn for ODBC, so that I can setup the client DSN
for ODBC access to the pervasive database.

I am not sure on how to do this on Netware, on NT you would go to the server
and just add a data source, but you cannot do this on Netware.

I have tried to use the pervasive control center, add new database option,
but when you try to go past the screen that allows you to choose the engine
interface and server, which has a user and password prompt beneath, it says:
    "Can't retrieve database names. You don't have access right for the
operation."

Thinking you have to specify the admin login and password, have tried that,
but still no go.

Help!!

2. What's the difference between ADO and ODBC?

3. P.SQL 2000 SP2a and Scalable.SQL interface

4. creating a new table with JOIN?

5. syntax of INSERT INTO in P.SQL 2000 SP2a

6. Release of the ROL Deductive Object-Oriented Database System

7. importing btrieve data to PSQL 2000

8. DbaseIII question.

9. NW server abend - P.SQL 2000 SP3 client to P.SQL 2000 SP2 server

10. Native Error -5099 on PSQL 2000 SP2a

11. Problems using PSQL 2000 SP2a and SP3

12. consulting for Btrieve 6.15 to P.SQL 2000 migration