question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When outputparameter value exceed limit characters(8000)value got truncated

See original GitHub issue

` request.on(‘returnValue’, (name, value, matadata)=>{

 result[name] = value; // if value is over 8000 characters value will got truncated

}); `

I tired using Text and NText both got error. Using VarChar has only 8000 limit characters. Not sure if there is any solution for this. I also post this issue in stackoverflow: https://stackoverflow.com/questions/62824283/tedious-package-when-outputparameter-value-exceed-limit-characters-8000

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Ethan0721commented, Jul 24, 2020

reading by row fixed our current error, thanks for your info i will try the above way as well. Thank you so much for you dig into this.

0reactions
IanChokScommented, Jul 17, 2020

This looks more like a sqlserver config error than tedious, because calling the stored procedure from tedious, the server itself is sending back truncated data (There’s a b at the 8,001 position in the database but as you can see the b has been cutoff).

image

Some work arounds I’ve seen is to do a while loop in the stored procedure (source)

DECLARE @Counter INT
SET @Counter = 0
DECLARE @TotalPrints INT
SET @TotalPrints = (LEN(@script) / 8000) + 1
WHILE @Counter < @TotalPrints 
BEGIN
    -- Do your printing...
    SET @Counter = @Counter + 1
END

See if the above while loop will help fix your issue?

And yeah, when trying to use Text instead of VarChar I’m receiving a deprecation warning as well… Data type 0x23 is a deprecated large object, or LOB, but is marked as output parameter. Deprecated types are not supported as output parameters. Use current large object types instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tedious Package when outputparameter value exceed limit ...
I saw someone said using several variable set up in store procedure to take the value. But the problem is I don't know...
Read more >
Why Is My VARCHAR(MAX) Variable Getting Truncated?
First we can see that the LEN() of our variable is only 8000 - not 8001 - characters long! 2018-05-13_18-31-28. Copying and pasting...
Read more >
t sql - varchar(MAX) text cuts off while going more than 8000 ...
SSMS cannot display a varchar greater than 8000 characters by default. However, it can store a varchar(max) value up to 2GB.
Read more >
Result truncation bug – SQLServerCentral Forums
So, basically, the output of all your concatenations is capped at 8000 bytes until you introduce the REPLACE. The later in the list...
Read more >
Stored procedure output parameter is VARCHAR(MAX) and ...
If a stored procedure has a parameter output set as VARCHAR(MAX), the output of the stored procedure is truncated to either 4000 or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found