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

Run-Time error '-2147217887 (80040E21)'

Article ID: C01007
Last updated: 2003/03/28
Run-Time error '-2147217887 (80040E21)'
Multi-step OLE DB operation generated errors.

During the Open method (Connection object)

The Open method will fail because either a Connection object property or data in the 'Connection string' is invalid. The most common cause of this error is when the location property is set to a directory that does not exist. Check your Connection object property settings to make sure that they are valid values.

When reading from or writing to a column

When this error is generates, it is more likely during setting data into the column but it can also occur when accessing the data. This error means that the data that you are trying to retrieve or set is in some way invalid. During setting of data this error can occur for the following reasons:

  • Number to large for numeric field. e.g. 5000000000 into an Integer field
  • The amount of data is to long. e.g. "ABCDEF" into a 5 length character field
  • Number too large for the precision of a Numeric field. e.g. In a Numeric field with a width of 10 with 2 decimals, the largest number would be 999999.99 and the smallest number would be -999999.99. In order to comply with OLE DB specifications, the leftmost character of a Numeric field is reserved to hold the sign.
  • The data in the field is in an improper format. The structure of the field (i.e. size or type) must be adjusted to reflect what the field contains, or the contents of the field must be changed to conform to the field's size and type outside of OLE DB. This can be done either using a CodeBase API program or using a tool that allows you to view and edit data (i.e. FoxPro, dBaseIV, or Clipper).

Sequiter Inc.