int datasiz,int datafmt,int pollInterval,int archInterval,
int depthShort,int depthLong,int heartBeat,float pTolerance,float aTolerance)
{
THistoryRecordStruct[] hrs = new THistoryRecordStruct[1];
THistorySpecification hsp = new THistorySpecification(pollInterval, archInterval, depthShort, depthLong, heartBeat, pTolerance, aTolerance, null);
hrs[0] = new THistoryRecordStruct(device, property, datasiz, datafmt, hsp);
String dev = "/"+context+"/"+server;
TLink lnk = new TLink(dev,"ADDHISTORY",null,new TDataType(hrs),TAccess.CA_WRITE);
return lnk.executeAndClose();
}