SBX - Search With Button

SBX - Forum Post Title

Dynamics SL 2015 SDK Error 9831 - value passed to Sparm is too Large

Microsoft Dynamics SL Forum

Mark E asked a question on 22 Mar 2019 11:56 AM
My Badges

Question Status

Verified

I was doing some development for a custom screen that copies Customer notes over to Sales Orders when saved.  Part of the code used a call in which the Snote.sNoteText for the customer is fetched, and passed as a parm to a SQL insert statement into the SNote table.  In doing this for larger notes, the following message was returned.

I have since figured out a different way to accomplish the notes copy, but never ran into this before.  Is there a physical limit to the size of a string parameter?  If so, where is it defined?

Reply
Erich Strelow responded on 26 Mar 2019 4:50 PM
My Badges
Verified Answer

I think the value you are asking is 4000 characters, or 8000 bytes. This is actually an old SQL server limit, not a SL one. It's probably been passed in recent versions, but since SL is varchar-less the limit still applies.

I'm not sure about the behavior with > 4000 long strings, but the worst scenario is truncation, in which case your data will miss all the punchlines. So, the bulletproof message makes sense.

Reply
Erich Strelow responded on 26 Mar 2019 4:50 PM
My Badges
Verified Answer

I think the value you are asking is 4000 characters, or 8000 bytes. This is actually an old SQL server limit, not a SL one. It's probably been passed in recent versions, but since SL is varchar-less the limit still applies.

I'm not sure about the behavior with > 4000 long strings, but the worst scenario is truncation, in which case your data will miss all the punchlines. So, the bulletproof message makes sense.

Reply

SBX - Two Col Forum

SBX - Migrated JS