ODataDB Sample 13 - Data Types

This example allows testing supported data types via different data providers.
The behavior can be different. For example, ODBC drivers may not support datetime2 or spatial data types.

The datatypes table contains fields for tested data types. The table data are available via any provider.
The usp_datatypes procedure selects data as is. ODBC and OLEDB providers may not support some types.
The usp_odbc_datatypes procedure selects data using the required casts to be suitable via ODBC and OLEDB.
You can open the source code of the tables and procedures using the links.

OLEDB providers are supported in the .NET Framework version but not in the .NET Core one.

You can open data in the editor. Choose your language below. Click links to view JSON data.

SQL Server

System.Data.SqlClientdatatypesusp_datatypesusp_odbc_datatypes$metatada
Microsoft.Data.SqlClientdatatypesusp_datatypesusp_odbc_datatypes$metatada
ODBC Driverdatatypesusp_datatypesusp_odbc_datatypes$metatada
ODBC Driver 17datatypesusp_datatypesusp_odbc_datatypes$metatada
SQLOLEDBdatatypesusp_datatypesusp_odbc_datatypes$metatada
MSOLEDBSQLdatatypesusp_datatypesusp_odbc_datatypes$metatada
Source codedatatypesusp_datatypesusp_odbc_datatypes

PostgreSQL

Npgsqldatatypesusp_datatypesusp_odbc_datatypes$metatada
ODBC Driverdatatypesusp_datatypesusp_odbc_datatypes$metatada
Source codedatatypesusp_datatypesusp_odbc_datatypes

MySQL

MySqlConnectordatatypesusp_datatypesusp_odbc_datatypes$metatada
MySql.Data.MySqlClientdatatypesusp_datatypesusp_odbc_datatypes$metatada
ODBC Driverdatatypesusp_datatypesusp_odbc_datatypes$metatada
Source codedatatypesusp_datatypesusp_odbc_datatypes

Oracle Database

ManagedDataAccessdatatypesusp_datatypesusp_odbc_datatypes$metatada
ODBC Driverdatatypesusp_datatypesusp_odbc_datatypes$metatada
OLEDB Providerdatatypesusp_datatypesusp_odbc_datatypes$metatada
Source codedatatypesusp_datatypesusp_odbc_datatypes

DB2

IBM.Data.DB2datatypesusp_datatypesusp_odbc_datatypes$metatada
ODBC Driverdatatypesusp_datatypesusp_odbc_datatypes$metatada
Source codedatatypesusp_datatypesusp_odbc_datatypes

NuoDB

NuoDb.Data.Clientdatatypesusp_datatypes$metatada
Source codedatatypesusp_datatypes

Snowflake

Snowflake.Datadatatypesusp_datatypesusp_odbc_datatypes$metatada
ODBC Driverdatatypesusp_datatypesusp_odbc_datatypes$metatada
Source codedatatypesusp_datatypesusp_odbc_datatypes

SQLite

The SQLite sample contains tables similar to tables of the servers above.

System.Data.SQLitesqlitemssqlpgsqlmysqloracledb2nuodb$metatada
ODBC Driversqlitemssqlpgsqlmysqloracledb2nuodb$metatada
Source codesqlitemssqlpgsqlmysqloracledb2nuodb$metatada

SQL Server Compact

System.Data.SqlServerCedatatypes$metatada
Source codedatatypes

Conclusion

ODataDB supports almost all data types via ODBC, OLEDB, and .NET data providers.

You can download samples for any supported database platform with the SaveToDB SDK.