Error while using sqlwrite - String data, right truncation

4 次查看(过去 30 天)
Hello, I am using the database toolbox, and I want to add a database to an already existing database on Microsoft SQL server.
However, I get this error:
Error using database.odbc.connection/sqlwrite (line 214)
ODBC JDBC/ODBC Error: ODBC Driver Error: [Microsoft][SQL Server Native Client 11.0]String data, right truncation.
Error in write2db (line 15)
sqlwrite(Conn, TableName, Table)
FYI, the number of columns are the same. I don't know if it is due to heavy strings or not.
Does someone have an idead?
Thanks a lot
  5 个评论
Guillaume
Guillaume 2019-4-2
What is the actual query that causes this error?
Also, see this article from Microsoft. Updating SQL server may fix the problem.
Guy Laviolette
Guy Laviolette 2019-4-3
Thank you for your answers. The problem wat that there was a longer string than the maximum length defined for a specific column.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Reporting and Database Access 的更多信息

产品


版本

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by