# POST a Dataset as a JSON-object to a MS SQL Server 2019 stored procedure

**URL:** <https://community.dreamfactory.com/t/post-a-dataset-as-a-json-object-to-a-ms-sql-server-2019-stored-procedure/5394>\
**Category:** Connecting to SQL\
**Created:** [June 7, 2022, 6:58am UTC](https://community.dreamfactory.com/t/post-a-dataset-as-a-json-object-to-a-ms-sql-server-2019-stored-procedure/5394 "2022-06-07T06:58:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Willi](https://avatars.discourse-cdn.com/v4/letter/w/fbc32d/32.png) [@Willi](https://community.dreamfactory.com/u/Willi)\
**Post date:** [June 7, 2022, 6:58am UTC](https://community.dreamfactory.com/t/post-a-dataset-as-a-json-object-to-a-ms-sql-server-2019-stored-procedure/5394/1 "2022-06-07T06:58:10Z")

</div>

Hello,

as mentioned in the topic i have to insert multiple records with one post api call that uses a mssql stored procedure in the background, but i couldn’t find a solution or guide for this problem. The only thing that worked was to use a query parameter and pass the JSON-object as Text to the stored procedure, but the problem is that the JSON-object as text is limited by NVARCHAR(Max).  
Do anyone has a solution or example code for this task?

Best Regards  
Willi

---

<div class="post-metadata">

**Author:** ![MrSpock](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@MrSpock](https://community.dreamfactory.com/u/MrSpock)\
**Post date:** [September 28, 2022, 10:46am UTC](https://community.dreamfactory.com/t/post-a-dataset-as-a-json-object-to-a-ms-sql-server-2019-stored-procedure/5394/2 "2022-09-28T10:46:30Z")

</div>

Hi Willi,

I am not an MS SQL expert. So for my understanding what would the call to the stored procedure look like in sql syntax, that would store several records in one call? I could than look up, whether this could be realized in a REST call.

Best Regards

MrSpock
