dbTalk Databases Forums  

ODBC Error: SQLSTATE = S1000, Native error code = -4993

comp.databases.btrieve comp.databases.btrieve


Discuss ODBC Error: SQLSTATE = S1000, Native error code = -4993 in the comp.databases.btrieve forum.



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

Default ODBC Error: SQLSTATE = S1000, Native error code = -4993 - 11-18-2003 , 08:48 PM






This happens with a normal query like :

SELECT * FROM "Pedimentos" where numero = '2004131'

When I open the table with control center it executes de default query
and lists all the rows, but as soon as I add "where numero = '2004131'
" and execute the query I get the error above. This is with Pervasive
v8.

Any Ideas what is worng?

TIA
Carlos San Miguel

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

Default Re: ODBC Error: SQLSTATE = S1000, Native error code = -4993 - 11-19-2003 , 06:58 PM






This Status code loosely translates to the Btrieve Status Code 6 --
Invalid Key Number. It means that the SQL engine attempted to use a
Btrieve Key Number that was not defined. This should not happen in a
clean database, but your database is having some problems.

If you run the Check Database Wizard against this data file, you'll see
that the Data Dictionaries (DDFs) probably define a SQL-level index on the
field "numero" which defines a certain index number, pero the Btrieve file
does not have that index number defined.

There are various ways of fixing these discrepancies, and the correct way
depends on many factors outside the realm of what we can examine in this
forum. Most commonly, if an index is missing, you can add it at the
Btrieve level. You can also remove the definition at the DDF level. Of
course, with NO index, the look-up will become a table-scan, and the
system will need to examine every record in the database to find its
corresponding records -- not pretty.

I'd go back & pressure the developer for dictionaries that match the
Btrieve files...
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 18-20: See our web site for details!


carlossm wrote:

Quote:
This happens with a normal query like :

SELECT * FROM "Pedimentos" where numero = '2004131'

When I open the table with control center it executes de default query
and lists all the rows, but as soon as I add "where numero = '2004131'
" and execute the query I get the error above. This is with Pervasive
v8.

Any Ideas what is worng?

TIA
Carlos San Miguel


Reply With Quote
  #3  
Old   
carlossm
 
Posts: n/a

Default Re: ODBC Error: SQLSTATE = S1000, Native error code = -4993 - 11-20-2003 , 12:25 AM



Thanks Bill, I think my DDF is wrong. I created the DDF's manually
based on the btrieve file definition. I'm using transactional access
to the tables, but now my customers need access to the tables so I
created the ddf's with SQL scripts and I think I must have missed and
Index definition.

Carlos San Miguel


carlos (AT) vanguardiatec (DOT) com (carlossm) wrote in message news:<61105627.0311181848.21ffe4e5 (AT) posting (DOT) google.com>...
Quote:
This happens with a normal query like :

SELECT * FROM "Pedimentos" where numero = '2004131'

When I open the table with control center it executes de default query
and lists all the rows, but as soon as I add "where numero = '2004131'
" and execute the query I get the error above. This is with Pervasive
v8.

Any Ideas what is worng?

TIA
Carlos San Miguel

Reply With Quote
  #4  
Old   
Curious George
 
Posts: n/a

Default Re: ODBC Error: SQLSTATE = S1000, Native error code = -4993 - 11-20-2003 , 01:17 AM



Bill:

How do you translate the -4993 into Btrieve error 6?

TIA,
C.G.

"Bill Bach" <bbach (AT) cncdsl (DOT) com> escribió en el mensaje
news:3FBC1198.EABE0779 (AT) cncdsl (DOT) com...
Quote:
This Status code loosely translates to the Btrieve Status Code 6 --
Invalid Key Number. It means that the SQL engine attempted to use a
Btrieve Key Number that was not defined. This should not happen in a
clean database, but your database is having some problems.

If you run the Check Database Wizard against this data file, you'll see
that the Data Dictionaries (DDFs) probably define a SQL-level index on the
field "numero" which defines a certain index number, pero the Btrieve file
does not have that index number defined.

There are various ways of fixing these discrepancies, and the correct way
depends on many factors outside the realm of what we can examine in this
forum. Most commonly, if an index is missing, you can add it at the
Btrieve level. You can also remove the definition at the DDF level. Of
course, with NO index, the look-up will become a table-scan, and the
system will need to examine every record in the database to find its
corresponding records -- not pretty.

I'd go back & pressure the developer for dictionaries that match the
Btrieve files...
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 18-20: See our web site for details!


carlossm wrote:

This happens with a normal query like :

SELECT * FROM "Pedimentos" where numero = '2004131'

When I open the table with control center it executes de default query
and lists all the rows, but as soon as I add "where numero = '2004131'
" and execute the query I get the error above. This is with Pervasive
v8.

Any Ideas what is worng?

TIA
Carlos San Miguel




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

Default Re: ODBC Error: SQLSTATE = S1000, Native error code = -4993 - 11-20-2003 , 06:18 PM



New math. ;-)

StatusCodeReturned + 4999 = Btrieve Status Code

Or, you can check the "Status Codes & Messages" on-line manual and see:

-4993: The key number parameter is invalid
See "6: The key number parameter is invalid" on page 1-54



Curious George wrote:

Quote:
Bill:

How do you translate the -4993 into Btrieve error 6?

TIA,
C.G.

"Bill Bach" <bbach (AT) cncdsl (DOT) com> escribió en el mensaje
news:3FBC1198.EABE0779 (AT) cncdsl (DOT) com...
This Status code loosely translates to the Btrieve Status Code 6 --
Invalid Key Number. It means that the SQL engine attempted to use a
Btrieve Key Number that was not defined. This should not happen in a
clean database, but your database is having some problems.

If you run the Check Database Wizard against this data file, you'll see
that the Data Dictionaries (DDFs) probably define a SQL-level index on the
field "numero" which defines a certain index number, pero the Btrieve file
does not have that index number defined.

There are various ways of fixing these discrepancies, and the correct way
depends on many factors outside the realm of what we can examine in this
forum. Most commonly, if an index is missing, you can add it at the
Btrieve level. You can also remove the definition at the DDF level. Of
course, with NO index, the look-up will become a table-scan, and the
system will need to examine every record in the database to find its
corresponding records -- not pretty.

I'd go back & pressure the developer for dictionaries that match the
Btrieve files...
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 18-20: See our web site for details!


carlossm wrote:

This happens with a normal query like :

SELECT * FROM "Pedimentos" where numero = '2004131'

When I open the table with control center it executes de default query
and lists all the rows, but as soon as I add "where numero = '2004131'
" and execute the query I get the error above. This is with Pervasive
v8.

Any Ideas what is worng?

TIA
Carlos San Miguel



Reply With Quote
  #6  
Old   
Curious George
 
Posts: n/a

Default Re: ODBC Error: SQLSTATE = S1000, Native error code = -4993 - 11-21-2003 , 01:00 PM



Thanks:

I'm not sure I would have sorted that one :-)

C.G.

"Bill Bach" <bbach (AT) cncdsl (DOT) com> escribió en el mensaje
news:3FBD59D6.1300422A (AT) cncdsl (DOT) com...
Quote:
New math. ;-)

StatusCodeReturned + 4999 = Btrieve Status Code

Or, you can check the "Status Codes & Messages" on-line manual and see:

-4993: The key number parameter is invalid
See "6: The key number parameter is invalid" on page 1-54



Curious George wrote:

Bill:

How do you translate the -4993 into Btrieve error 6?

TIA,
C.G.

"Bill Bach" <bbach (AT) cncdsl (DOT) com> escribió en el mensaje
news:3FBC1198.EABE0779 (AT) cncdsl (DOT) com...
This Status code loosely translates to the Btrieve Status Code 6 --
Invalid Key Number. It means that the SQL engine attempted to use a
Btrieve Key Number that was not defined. This should not happen in a
clean database, but your database is having some problems.

If you run the Check Database Wizard against this data file, you'll
see
that the Data Dictionaries (DDFs) probably define a SQL-level index on
the
field "numero" which defines a certain index number, pero the Btrieve
file
does not have that index number defined.

There are various ways of fixing these discrepancies, and the correct
way
depends on many factors outside the realm of what we can examine in
this
forum. Most commonly, if an index is missing, you can add it at the
Btrieve level. You can also remove the definition at the DDF level.
Of
course, with NO index, the look-up will become a table-scan, and the
system will need to examine every record in the database to find its
corresponding records -- not pretty.

I'd go back & pressure the developer for dictionaries that match the
Btrieve files...
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 18-20: See our web site for details!


carlossm wrote:

This happens with a normal query like :

SELECT * FROM "Pedimentos" where numero = '2004131'

When I open the table with control center it executes de default
query
and lists all the rows, but as soon as I add "where numero =
'2004131'
" and execute the query I get the error above. This is with
Pervasive
v8.

Any Ideas what is worng?

TIA
Carlos San Miguel





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.