rahul.kolhe22
11th December 2008, 10:02
Hi,
I am trying to use the array of the record buffer to store some bunch of records. I am able to store the values of the fields in the array of record buffer, but I am not able to get the values back from it.
Code used by me:
select ttmmm999.*
from ttmmm999
where ttmmm999._index1 = {:value1, :value2}
selectdo
db.row.length(tttmmm999,buff.size)
cntr = cntr + 1
if cntr > total.size then
total.size = total.size + 20
alloc.mem(rec.buff, buff.size, total.size)
endif
tbl.ptr = db.bind("tttmmm999", rec.buff(1,cntr))
ret = db.columns.to.record(tbl.ptr)
endselect
while cntr > 0
db.record.to.columns(tbl.ptr)
cntr = cntr - 1
endwhile
free.mem(rec.buff)
I refered the following link:
http://www.baanboard.com/baanboard/showthread.php?p=59661#poststop
But I am unable to get the value form the record buffer to the table field.
Thanks in advance
--Rahul
I am trying to use the array of the record buffer to store some bunch of records. I am able to store the values of the fields in the array of record buffer, but I am not able to get the values back from it.
Code used by me:
select ttmmm999.*
from ttmmm999
where ttmmm999._index1 = {:value1, :value2}
selectdo
db.row.length(tttmmm999,buff.size)
cntr = cntr + 1
if cntr > total.size then
total.size = total.size + 20
alloc.mem(rec.buff, buff.size, total.size)
endif
tbl.ptr = db.bind("tttmmm999", rec.buff(1,cntr))
ret = db.columns.to.record(tbl.ptr)
endselect
while cntr > 0
db.record.to.columns(tbl.ptr)
cntr = cntr - 1
endwhile
free.mem(rec.buff)
I refered the following link:
http://www.baanboard.com/baanboard/showthread.php?p=59661#poststop
But I am unable to get the value form the record buffer to the table field.
Thanks in advance
--Rahul