sql procedure output value been truncated
See original GitHub issueDriver version
7.0.0.jre8
SQL Server version
Microsoft SQL Server 2017 (RTM) - 14.0.1000.169 (X64) Aug 22 2017 17:04:49 Copyright © 2017 Microsoft Corporation Enterprise Edition (64-bit) on Windows Server 2016 Datacenter 10.0 <X64> (Build 14393: ) (Hypervisor)
Client Operating System
windows server 2016 datacenter
JAVA/JVM version
openjdk version “1.8.0_191”
Table schema
not table it is procedure
Problem description
procedure
ALTER PROCEDURE [dbo].[PROC_queryPlanReport]
@userId bigint,
@pageNo int,
@length int,
@param varchar(255),
@report varchar(max) output
AS
.....
when i run
declare @param varchar(max), @report varchar(max);
set @param='{"template_name":"xxxxxxx","plan_id":460}';
exec PROC_queryPlanReport 178,0,0, @param, @report output;
select @report;
select len(@report)
the len value is 7792
but when i call this procedure in java the @report
length is 7750
why has this difference
and my commection string is jdbc:sqlserver://47.244.60.83:1433;databaseName=wdb;sendStringParametersAsUnicode=false
i already add sendStringParametersAsUnicode=false
thanks for your reply
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Return strings from SQL Server stored procedures being ...
But the strings passed back from the stored procedures are being truncated to 4000 characters. How do I keep truncation from happening? Details: ......
Read more >sql procedure output value been truncated · Issue #884 - GitHub
I seem to be missing something I'm not getting the correct results as you on SSMS. To create the stored procedure successfully I...
Read more >String returned to Output Parameter from Stored Procedure is ...
I'm running a stored procedure which is returning a value. ... value was greater than this default value, hence the truncation error.
Read more >Output parameter value from stored procedure is truncated
Stored procedure output parameter is VARCHAR(MAX) and the data is truncated to either 4000 or 8000 characters with the JDB…
Read more >Silent Data truncation in SQL Server 2019 - SQLShack
As we can see above, SQL truncate error occurred due to the length of the data more than the length of the string...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
glad for you help . I resolve this problem you may close this issue 😃
it’s very nice for your help . but I need automap sql result to java object .so I need use
SimpleJdbcCall
.finally I try castvarchar(max)
totext
at the end of the procedure then got full text. Thanks for your help