发表于:2002-03-05 17:54:00
楼主
我用ODBC把历史数据存储在Access97数据库中,其中时间分别应用以下表示:
.TimeHour
.TimeMinute
.TimeDay
在应用程序脚本中每60000ms判断一次,如果是0,10,20...50分钟就存储一次历史数据,以前发现它把数据存储在前一分钟的某一时刻,例如9;59;30,但大部分存储在正确时刻,例如10:00:23。现在发现他有时把数据存储在9:23:XX等不定时刻,我重新安装Intouch不器作用,不知如何解决?
附:程序片段
IF ((Trunc($Minute / 5 ) * 5 )== $Minute ) THEN
RealTag.Name=TI01.Name;
ResultCode = SQLSelect(ConnectionID, RealTableName, "RealBindlist", "","");
ResultCode = SQLInsert(ConnectionID, RealTableName,"RealBindlist" );
ResultCode =SQLEnd( ConnectionID );
RealTag.Name=TI02.Name;
ResultCode = SQLSelect(ConnectionID, RealTableName, "RealBindlist", "","");
ResultCode = SQLInsert(ConnectionID, RealTableName ,"RealBindlist" );
ResultCode =SQLEnd( ConnectionID );
....................
End IF