- Log in to post comments
User bio
404 bio not found
Member since Nov 20, 2023
Posts:
Replies:
Things have slightly changed from our side.
- initially used JSON to serialize data and pass it as a parameter to an
INSERTstatement. - Recently, we switched to storing XML data instead of JSON, and I am now trying to store this XML using the stored procedure
set tQuery="{ CALL dbo.SavePatientDetails (?) }"Set tSC = ..Adapter.ExecuteProcedure(.tResultSnapshots, .tOutputParms, tQuery,,xmlContent)Problem:
- Parameterized Query: Works fine when using
VARCHAR(8000)as the parameter type in the stored procedure. - Fails when using
NVARCHAR(MAX)as the parameter type for passing XML data. The issue appears only when using theNVARCHAR(MAX)type, and I am unable to insert the XML content.
Your input is greatly appreciated. Thanks in advance for your help!
- Log in to post comments
There are no errors returned. An empty string is being inserted into the database field, even though the trace shows the JSON correctly as {"CHI":"2894","Forename":"Janis"}.
- Log in to post comments
Certifications & Credly badges:
Nimisha has no Certifications & Credly badges yet.
Followers:
Nimisha has no followers yet.
Following:
Nimisha has not followed anybody yet.
@Enrico Parisi
No, NVARCHAR(8000) this doesn't work either.
I am using ensemble 2018 and database is SQL Server Management Studio 20