This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Writing Data Common Errors

This table describes how to address common errors you might encounter while working with the sqlwrite function. These errors apply to all database vendors.

Error MessageProbable CausesResolution

columnname column value must be a numeric array or cell array of numeric scalars.

The specified data type of the database column is invalid.

Specify a valid data type for the database column. For valid data types, see the data input argument description in the sqlwrite function.

columnname column value must be a datetime array, cell array of character vectors, or string array.

columnname column value must be a logical array.

columnname column value must be a cell array of character vectors or string array.

JDBC/ODBC Error: errormessage

The JDBC or ODBC driver throws an error.

Consult your database driver documentation.

Unable to create tablename without column types. Specify 'ColumnType' for each variable in the table data.

You are creating an empty database table.

Specify the 'ColumnType' name-value pair argument and provide the data type for all columns in the database table. For details, see the sqlwrite function.

Specify 'ColumnType' for each variable in the table data.

You did not specify the data type of at least one column in the database table.

Specify the 'ColumnType' name-value pair argument and provide the data type for all columns in the database table. For details, see the sqlwrite function.