What does Windows error code 1629 (ERROR_DATATYPE_MISMATCH) mean?

 
Previous Next
ERROR_INVALID_TABLE ERROR_UNSUPPORTED_TYPE

ERROR_DATATYPE_MISMATCH

The supplied Windows Installer data has the wrong type.

ERROR_DATATYPE_MISMATCH is Win32 error 1629 (0x65D). MSI databases, records, properties, and API calls distinguish integer, string, stream, and other representations. A value may look reasonable in a log yet be invalid for the target field or operation. The problem is usually package authoring, record construction, or an automation binding that converts values incorrectly.

Typical type conflicts

  • a string is written to an integer field or an integer is treated as formatted text
  • a record field expected to contain a stream receives a path or property value
  • SQL or table authoring uses a column with incompatible MSI schema type
  • COM or scripting automation passes a variant of the wrong kind
  • a custom action serializes data without preserving the receiving contract

Data to retain

Log the MSI function or SQL statement, table and column, field number, declared schema type, actual caller type, value length, package database version, and component or custom action that constructed the record. For binary or secret data, record size and hash rather than contents. Include transforms because they can change table definitions and values.

Diagnostic sequence

Inspect the target table with an MSI database tool and compare its column definition with the record-building code. Validate field numbering carefully because field zero has special uses in some record APIs. For automation clients, inspect the runtime variant type before the call rather than trusting language coercion.

Apply transforms individually to find where the incompatible value enters. Review generated packages after build, not only source authoring files. If the failure appears only on one platform or bitness, check interop declarations and integer-width conversion.

Prevention and remediation

Correct the package schema or caller type, rebuild, and test installation, repair, upgrade, and rollback paths. Use typed package-generation abstractions and validation tools instead of concatenating MSI SQL or relying on implicit script conversion. Reject invalid input before opening a transaction so the product is not left partially configured.

Difference from unsupported type

ERROR_DATATYPE_MISMATCH means the type is valid in MSI generally but wrong for this destination. ERROR_UNSUPPORTED_TYPE means the requested type itself is not supported by the operation or implementation. Logging both declared and actual types distinguishes the two.

Example

A custom database action creates an MSIHANDLE record and writes a component size as text into a field defined as integer. The record update returns 1629. Using the integer record setter and validating the table schema resolves the failure.

References


Looking for a different code? Search another status or error code.