I have run following script to access data pool in RFT successfully, but it can only work at the first time in one run-time. Exception will be thrown after I try to reopen the dstirubtor.rftdp, it appears the file is locked. How to address it?
java.io.File dpFile = new java.io.File((String)getOption(IOptionName.DATASTO RE),"Datapool/Distributor.rftdp");
IDatapool dp = dpFactory().load(dpFile, true);
IDatapoolIterator dpIter = dpFactory().open(dp, null);
while ( !dpIter.dpDone() )
sDistributorCode = dpIter.dpCurrent().getCell(0).getStringValue();
In this case you have to use unload instead of close on dpfactory object.
Thanks and Regards,
Thanks. It works now. [img]/images/graemlins/smile.gif[/img]
You are welcome!!