dpConnectSingle??

Find and share HowTos to various installations / configurations!
5 posts • Page 1 of 1
yavaskoray
Posts:29
Joined: Mon Dec 02, 2013 11:15 am

dpConnectSingle??

Post by yavaskoray »

Hello Gents,

I have saved a list of datapoints in a dyn_string DPE. After making dpGet i got my dpe list. Now I need to make a connect to this datapoint list. :ohmy:

- dpConnect is not a perfect solution because I need only the last changed dpe. Yes i can make a dpConnect to the "_online.._value" and "_online.._stime" and compare the time but I wont be a perfect solution.

- dpQueryConnectSingle is also not a solution because I do not have any parameters to make a query. I have only a datapoint list as an array.


The perfect solution would be a "dpConnectSingle()" function :woohoo:

Is there a better way to achieve my goal? Any suggestions?

Regards,
Koray

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: dpConnectSingle??

Post by leoknipp »

If you want to connect to a list of datapoints where the length of the list is not fixed normally a dpQueryConnectSingle()/dpQueryConnectAll() is used.
I did not understand why you expect that a dpQueryConnectSingle cannot be used in that case.
What are the "parameters" you do not have?

Best Regards
Leopold Knipp
Senior Support Specialist

yavaskoray
Posts:29
Joined: Mon Dec 02, 2013 11:15 am

Re: dpConnectSingle??

Post by yavaskoray »

What I mean is I have the list of the datapoints already. And i do not have any parameters/rules (...From * ,Where *,....) to make a query which will give me the same list of datapoints as a result.

Regards,
Koray

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: dpConnectSingle??

Post by leoknipp »

If you already have the list of dp elements you can use them at the FROM statement when buliding the query string. Then a connect is only made for the given dp elements.

Best Regards
Leopold Knipp
Senior Support Specialist

yavaskoray
Posts:29
Joined: Mon Dec 02, 2013 11:15 am

Re: dpConnectSingle??

Post by yavaskoray »

Thank you.

5 posts • Page 1 of 1