Quantcast
Channel: OSIsoft Users Community
Viewing all articles
Browse latest Browse all 1120

Unable to update specific events in picomp2

$
0
0

Hi all,

 

I need to update values of historical events in picomp2, using JDBC.

 

For some events it is possible, however for others, JDBC fails to update them, and 'false' below means no record was updated (.executeUpdate() returned 0).

 

Is this because some millisecond difference between OsiPi server and Java?

 

Interestingly, the update statements work if directly used in in PI SQL Commander.

 

Appreciate your help.

 

 

UPDATE [piarchive].[picomp2] set value = 4002.0 where tag = 'Some_State' and time = '2014-05-02 00:06:52.04'
false                                                        
UPDATE [piarchive].[picomp2] set value = 3008.0 where tag = 'Some_State' and time = '2014-05-02 00:06:52.04'
false                                                        
UPDATE [piarchive].[picomp2] set value = 3003.0 where tag = 'Some_State' and time = '2014-05-02 00:06:52.04'
false                                                        
UPDATE [piarchive].[picomp2] set value = 3006.0 where tag = 'Some_State' and time = '2014-05-02 00:06:53.038'
false                                                        
UPDATE [piarchive].[picomp2] set value = 3002.0 where tag = 'Some_State' and time = '2014-05-02 00:26:53.037'
true                                                         
UPDATE [piarchive].[picomp2] set value = 3007.0 where tag = 'Some_State' and time = '2014-05-02 00:26:53.037'
true                                                         
UPDATE [piarchive].[picomp2] set value = 3006.0 where tag = 'Some_State' and time = '2014-05-02 00:26:54.035'
true                                                         
UPDATE [piarchive].[picomp2] set value = 3007.0 where tag = 'Some_State' and time = '2014-05-02 00:46:53.051'
false                                                        
UPDATE [piarchive].[picomp2] set value = 3007.0 where tag = 'Some_State' and time = '2014-05-02 00:46:53.051'
false                                                        
UPDATE [piarchive].[picomp2] set value = 3007.0 where tag = 'Some_State' and time = '2014-05-02 00:46:53.051'
false

 


Viewing all articles
Browse latest Browse all 1120

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>