Data types
- Last Updated: July 30, 2025
- 1 minute read
- DataDirect Connectors
- ODBC
- MongoDB 8.0
- Documentation
The following table lists native data types supported by the driver and how they are mapped to ODBC data types.
| MongoDB Data Type | ODBC Data Type |
|---|---|
| ARRAY | SQL_LONGVARCHAR |
| BIGINT | SQL_BIGINT |
| BINDATA | SQL_VARBINARY |
| BOOLEAN | SQL_BIT |
| CHAR | SQL_CHAR |
| DATE | SQL_TYPE_TIMESTAMP |
| DECIMAL128 | SQL_DECIMAL |
| DOUBLE | SQL_DOUBLE |
| INTEGER | SQL_INTEGER |
| JAVASCRIPT | SQL_VARCHAR |
| LONGVARCHAR | SQL_LONGVARCHAR |
| OBJECT | SQL_LONGVARCHAR |
| OBJECTID | SQL_VARCHAR |
| REGEX1 | SQL_VARCHAR |
| STRING | SQL_VARCHAR |
1 The driver supports only the literal format for
the Regex data type. Therefore, when executing an Insert or Select statement, Regex values
must be specified using the literal format.