mgakhar
10th January 2007, 19:35
Hi,
We have a requirement where we have to read a file and upload data from the file into Baan tables. So on the first form, the user enters the file name and path etc and then hits continue. On hitting continue, the control shifts to the 2nd form and here we display the contents of the file.
Lets assume that the file just contains list of items.
Here is my code written for this -
i = 1
while seq.eof(fp) = 0
seq.gets(item, 2048, fp)
do.occ(i, set.items, item)
i = i + 1
endwhile
function set.items(domain tcitem i.item)
{
item.del = i.item
update.occ()
}
The 2nd form has just 1 field (multiocc) - item.del. The problem is that the 2nd form displays the last item in the file for all occurrences.
What am I doing wrong? Please help.
Please note that we do not want to use exchange schemes for this requirement.
Thanks
MG.
We have a requirement where we have to read a file and upload data from the file into Baan tables. So on the first form, the user enters the file name and path etc and then hits continue. On hitting continue, the control shifts to the 2nd form and here we display the contents of the file.
Lets assume that the file just contains list of items.
Here is my code written for this -
i = 1
while seq.eof(fp) = 0
seq.gets(item, 2048, fp)
do.occ(i, set.items, item)
i = i + 1
endwhile
function set.items(domain tcitem i.item)
{
item.del = i.item
update.occ()
}
The 2nd form has just 1 field (multiocc) - item.del. The problem is that the 2nd form displays the last item in the file for all occurrences.
What am I doing wrong? Please help.
Please note that we do not want to use exchange schemes for this requirement.
Thanks
MG.