问题描述
我开发了OPC服务器从OPC服务器读取标签的应用程序,存储到MYSQL表中.
在这个过程中,我将所有更改值都放入了数组中.
然后这个值存储到MYSQL表中.但是问题是这个OPC服务器仅返回更改参数(例如,如果温度变化则为室温,则返回值,否则不返回任何值).所以我想观察标签的每秒值(温度),但只有在更改值时我才能获取数据.
但我想要这样
I developed the application for OPC server Reading Tags from the OPC server & stored into the MYSQL table.
In this I get the all changes values into the array.
then this values are stored into the MYSQL table.But the problem is this OPC server returns only change parameter (e.g room temperature if temperature change then it returns the value otherwise nothing).So i want to watch the per second value of the tags(temperature) but i will get the data only when the value get changed.
but I want like this
2011-07-01 01:00:00 1
2011-07-01 01:00:01 2//changed
2011-07-01 01:00:02 2
2011-07-01 01:00:03 2
2011-07-01 01:00:04 3//changed
所以我将用来存储常数值的&新的更新将存储到一个日志中.在我的应用程序中,我将使用数据表,但是当我更新现有值时,它会抛出异常
so what i will be used to stored the constant value also & new updated will be stored into the one log In my application i will be used the datatable but when i will be updated the existing value it throws exception as
Data Table internal index is corrupted: 5
这些都是使用线程完成的
任何解决方案
在此先感谢...
these all things are done using threading
Any solution
thanks in advance...
推荐答案
这篇关于值不变时保持恒定值.值更改时更新数据表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!