How Do I Get Data From PAC to Node-RED to MS SQL Server


#1

I’m halfway there on the front end. That is, I’m able to connect using a MSSQL node and do a simple query. There’s a little query window in the node. How do I grab data from a table in my PAC and send it to the server? I know how to use the PAC nodes to pull data, my issue is how tor get it from there into the SQL node and onto the server.

This is just a proof of concept at the moment, so just being able to move a couple of data points from A to B is all I’m looking for.

Edit: Just found this video on the Opto22 website. I’m sure you guys put it together as soon as you saw my post. I’m impressed!

http://www.opto22.com/players/w_player.aspx?vid=zf0qdazf7x&pid=9niybg9i64&sec=6&vi=5

Thanks,

Dave


#2

Glad you found it.
There are more and more resources added to workshops.opto22.com all the time.
That video was done by our summer intern Terry. Hes made a few posts to the forums, mostly in the Node-RED category.

I’m also sure you saw the other long thread on this topic in the forums by doing a search on ‘mssql’, there is a lot of information in there as well (including sample flows).


#3

Where do I find the MSSQL Node to download and add?

Thanks, Malcolm


#4

On the top right menu in the Node RED gui, there is a Manage Palette option. In there you can search for new nodes. Type in mssql and you will get a half dozen options to choose from.


#5

Thanks, I will do that.


#6

Which do you suggest?


#7

node-red-contrib-mssql seems to be the most popular…


#8

That’s what I’m using.


#9

I installed that, thanks.


#10

This doesn’t answer the specific question, but you could go directly to MS SQL using DataLink. No programming needed.


#11

That’s true. However keep in mind you can’t do a SQL UPDATE command using the Opto DataLink. You can only do an INSERT which means if you have existing data it will either append to it or only update a single column and wipe out all the other columns.