# Sending multiple modbus data values to SQL Server (Azure) in one stored procedure

**URL:** <https://discourse.nodered.org/t/sending-multiple-modbus-data-values-to-sql-server-azure-in-one-stored-procedure/30488>\
**Category:** General\
**Created:** [21 July 2020 15:39 UTC](https://discourse.nodered.org/t/sending-multiple-modbus-data-values-to-sql-server-azure-in-one-stored-procedure/30488 "2020-07-21T15:39:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [21 July 2020 17:57 UTC](https://discourse.nodered.org/t/sending-multiple-modbus-data-values-to-sql-server-azure-in-one-stored-procedure/30488/2 "2020-07-21T17:57:02Z")

</div>

This is what I would do...

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/1/71c4a53febd771f3bbd70af2bcb0873c219b7e72.png)

- Read all bytes in one hit. This has 2 benefits -
  - data is consistent (grabbed at same point in time)
  - approximately 10 times faster than 11 individual polls

- use node-red-contrib-buffer-parser to convert data into Floats in one go (see screen shot below)
- (optional) use mssql-plus (beta version) and use typed parameters (see screen shot below)

### Buffer Parser...

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/1/61348e77ca17e09481d5272e64dd5cdd06754b92.png)

### MSSQL-PLUS (beta version)...

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/f/3f05356e3f94d55d4fb48abfa1ae537785779906.png)

#### Edit in case it's unclear...

The single flow at the bottom of the 1st screenshot replaces everything you did. I.e. if you use the 5 node flow I added, the 45 node flow you did becomes redundant/unneeded

---

_[View the full topic](https://discourse.nodered.org/t/sending-multiple-modbus-data-values-to-sql-server-azure-in-one-stored-procedure/30488)._
