We help IT Professionals succeed at work.

Help with SP data type

High Priority
111 Views
Last Modified: 2019-11-20
I have a SP with the line below:


sp_updatenote.Parameters.Append sp_updatenote.CreateParameter("@comments", 202, 1, Len( "" & sp_updatenote__comments ), sp_updatenote__comments)


The text that is inserted using the SP is longer than what the above line of code will permit (Not sure what the max length is), so its truncating the code.

What change is needed so that it allows maxvarchar ?
Comment
Watch Question

CERTIFIED EXPERT
Commented:
As indicated here or here the parameter type should be 203.

You should also consider different data access approach, e.g. via SQL commands which are better suitable for SP calls by issuing ExecuteNonQuery().

Author

Commented:
Thanks. Ill try 203.

We are moving the system to NetCore so we only need this fix for the next couple months.

Author

Commented:
Thanks!

Explore More ContentExplore courses, solutions, and other research materials related to this topic.