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

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

1 Like

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).

1 Like

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

Thanks, Malcolm

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.

Thanks, I will do that.

Which do you suggest?

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

That’s what I’m using.

I installed that, thanks.

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

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.

Did you eventually get this going? Care to share your flow?

What exactly are you looking for, I re-read this thread and its not clear.
Is the answer you need in this thread? SNAP PAC and groov Nodes

I have done some pac to Node-RED to MySQL, but I am not sure what you are looking for.

Here is a pretty extensive thread that I was involved in: