Could someone please xplain to me why the following is not working...
xfa.sourceSet.NRSP_Q16b.open();
xfa.sourceSet.NRSP_Q16b.first();
var
nDBIndex = 0;
while
(xfa.sourceSet.NRSP_Q16b.nodes.item(nDBIndex).className != "command")
{
nDBIndex
++;
}
xfa.host.messageBox("nDBIndex = "
+ nDBIndex);
// Backup the original settings before assigning BOF and EOF to stay
var
sBOFBackup = xfa.sourceSet.NRSP_Q16b.nodes.item(nDBIndex).query.recordSet.getAttribute("bofAction");
var
sEOFBackup = xfa.sourceSet.NRSP_Q16b.nodes.item(nDBIndex).query.recordSet.getAttribute("eofAction");
xfa.host.messageBox("sBOFBackup, sEOFBackup = "
+ sBOFBackup + ", " + sEOFBackup);
xfa.sourceSet.NRSP_Q16b.nodes.item(nDBIndex).query.recordSet.setAttribute("stayBOF"
, "bofAction");
xfa.sourceSet.NRSP_Q16b.nodes.item(nDBIndex).query.recordSet.setAttribute("stayEOF"
, "eofAction");
The first messageBox is returning nDBIndex = 1. The second messageBox is returning bofAction = moveFirst and eofAction = moveLast.
But the code is failing on the first 'setAttribute' line. Any clues?
Thanks,
Chris
Views
Replies
Total Likes