Using DataLink with SQL server


#1

Hi All,
I am trying to read data from my Opto22 device and store the information in a SQL server data base. When I test the connection to the data base I get a success. but when I Run the project I get an Error Cannot connect to table:XXXX.

Any help is greatly appreciated.


#2

Hi Royal,

I’m sorry your having trouble w/OptoDataLink. I’ve forwarded your info to our support team so they can help you troubleshoot. (They’ll want to know the version of ODL you’re using, etc.)

In the meantime, might you be connecting your SQL database to a SNAP-PAC-R or -S series controller, running 9.5 firmware? I ask because the RESTful API in the 9.5 firmware opens up an exciting variety of new options for connecting your controller tags to database, without the middleware!

Check out these examples: http://developer.opto22.com/2016/10/18/sql-server-2016-code-sample/

-OptoMary


#3

Hi Royal,
Just following up on this, was the trouble w/your names? Did that have spaces in them (which ODL doesn’t support)?
Thanks,
Mary


#4

the solution was to use SQL server Authentication instead of windows authentication.