'SQL Error [8152] String or binary data would be truncated.' happens in SQL-Server #13057
FelixxShin
started this conversation in
General
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for your reply. I attach a screen shot from the Query Manager. Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (Intel X86) PS. It seems like you executed on Window version. Could you execute it on Mac? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
System information:
Connection specification:
Microsoft SQL Server 2019 (RTM-CU8-GDR) (KB4583459) - 15.0.4083.2 (X64)
Nov 2 2020 18:35:09
Copyright (C) 2019 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 18.04.5 LTS)
Describe the problem you're observing:
Hello.
I have a problem about using the Dbeaver with T-SQL.
When I create a procedure, It always says that 'SQL Error [8152] [22001]: String or binary data would be truncated.'
There is nothing to use any insert/update statement.
but, Microsoft Azure Data Studio for Mac (v1.26.1) is fine and Microsoft SQL Server Management Studio works as well.
I don't know whether it's a bug or not.
I think there is some option in Dbeaver Preference but I can't find it.
Has anyone experienced the same problem?
I couldn't find any article on Google...
Please I really need to help from everyone.
Thank you for hearing me.
Steps to reproduce, if exist:
CREATE TYPE tbl_UserDefinedTable AS TABLE
(
pk int,
id VARCHAR(50)
);
CREATE PROCEDURE sp_UserDefinedTable
@tvp tbl_UserDefinedTable READONLY
AS
SET NOCOUNT ON
Include any warning/errors/backtraces from the logs
org.jkiss.dbeaver.model.sql.DBSQLException: SQL Error [8152] [22001]: String or binary data would be truncated.
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:133)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:509)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$0(SQLQueryJob.java:440)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:167)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:427)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:812)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:3233)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:118)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:167)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:116)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer$ResultSetDataPumpJob.run(ResultSetViewer.java:4517)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1632)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:872)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:767)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7225)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3053)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:247)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:222)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:743)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:327)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:130)
... 12 more
Beta Was this translation helpful? Give feedback.
All reactions