Menu

#766 Stored Procedure - out Parameter Truncated to 8,000 bytes

v1.3
open
nobody
1
2016-10-10
2016-10-10
No

jTDS trucates the data returned for an out paramter of type varbinary(max) to 8,000 bytes. This has been observed when calling a stored procdure in SQL Server 2005 and SQL Server 2008 R2. It may also occur with other databases and versions. The stored procedure is called via a CallableStatement. No error is provided in the logging output of jTDS. It silently truncates the data.

Here's an example of a stored procedure signature:

procedure [User].[pTest]
@data varbinary(max) out
,@name nvarchar(max) = null
,@date datetime

In this example, the @data stored procedure parameter will usually contain ~10,000 bytes after the procedure executes. Using SQL Server Management Studio to call the stored procedure via EXEC, all ~10,000 bytes will be in @data after executing. From the logs, jTDS returns only 8,000 bytes. Can you please confirm this is a reproducible issue? Do any other details need to be provided? Thanks.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.