hardei
23rd September 2007, 12:30
Hi,
I am very new in AFS.I want to delete the data from session tirou1502m000 in BaaN 5.I have selected Item and Item group..

select tcibd001.*,tietc802.*
from tcibd001,tietc802
where tcibd001.item = :item and
tietc802.citg = :tcibd001.citg
selectdo
ret = stpapi.delete("tirou1502m000",0,error)
if not ret then
ret = stpapi.delete("tirou1502m000",0,error)
else
message("deleted")
endif


getting error = "Session Not Available"

Can Anyone send me the right Code?

Thanks in Advance

mark_h
24th September 2007, 03:01
Well first you would have to do a stpapi.put for the two fields, then follow with a stpapi.find. This should find the record in tirou1502m000. Then you can use the stpapi.delete on the record. Without the put and find the session is not available for the delete. See the sticky thread at the top of this forum for documentation.