CodeBase Database Tools For Programmers
Search   
Advanced Search
products   order   consulting   reviews   downloads   links   support   contact   about us    home  
CodeBase Knowledge Base
Knowledge Base Home
Walkthroughs
Development Environment Specific
Queries and Relations
Client/Server
Expressions
Indexing and Seeking
Performance & Memory Management
CodeBase Administrator
OLE DB
ODBC
JDBC
CodeControls
Errors and Error Handling
Miscellaneous

Unable to retrieve or set data in Numeric fields of size 1

Article ID: C01008
Last updated: 2002/10/08

This error is due to a limitation of the OLE DB standard. To support the OLE DB Numeric data type, some limitations are enforced. These limitations are that the precision of the data will be reduced for sign and decimals. One byte of the total size will be reserved for sign and one byte will be reserved for the decimal if the field supports decimals. For xBASE numerical fields of size 1 and no decimals, this is a problem as the precision is reduced by 1 for the size and thus the precision is now zero. When this happens setting data will always cause a '-2147217887 (80040e21)' error because any data that you try to send will have too many digits. The only solution to this problem is to increase the size of the numerical field to 2. This will not affect any previous programs that use this database as you still only want 1 digit in the field.

transform.zpp is a CodeBase program that will modify your tables and increase all Numeric fields of size one to Numeric fields of size two.
Download transform.cpp

Sequiter Inc.