Thanks for the reply.
I'm retrieving and showing the data with a SQL-Select statement. The SQL-Select statement calls a UDF which retrieves a comma delimited list of the inventory #'s as such:
Select sohead.sonum,custmast.company,padr(soitemlistbysonum(sohead.sonum),20) as inventorylist ;
from invhead ;
left outer join custmast ;
on sohead.custid=custmast.custid ;
where sohead.date=date() ;
order by sohead.sonum ;
into cursor c_soheadwitemlist
The soitemlistbysonum UDF looks like this:
lparameter lnSONum
local lnSelect,lcItemList
lnSelect=select()
lcItemList=''
select soitems
locate for sonum=lnSONum
do while found()
lcItemList=lcItemList+iif(!empty(lcItemList),',','')+alltrim(str(sonum.itemnum))
enddo
select (lnSelect)
return lcItemList
I am using FLUSH after adding the records. By the way I use INSERT-SQL rather than append blank.
Brandon Harker
Sebae Data Solutions