cherokee
21st January 2005, 21:31
Hello everyone,

I am haveing problems with this session timrp1101m000, even the record key does not exits(item,date), it gives back error "Record already exist" and does saves.


stpapi.put.field("timrp1101m000","timrp001.item",t.item)
stpapi.put.field("timrp1101m000","timrp001.cntr",dummy.cuni)
stpapi.put.field("timrp1101m000","timrp001.fdat",str$(t.date))
stpapi.put.field("timrp1101m000","timrp001.fqan",str$(fqan))
stpapi.insert("timrp1101m000",true,error)
if not isspace(error) then
stpapi.recover("tiitm1101m000",error)
endif
stpapi.end.session("timrp1101m000")

Can you see any problem with this coding?

Thanks in advance,

Carlos

mark_h
21st January 2005, 22:49
Try this before your code:


stpapi.put.field("timrp1101m000","timrp001.item",t.item)
stpapi.put.field("timrp1101m000","timrp001.cntr","")
stpapi.change.view( "timrp1101m000" )


This is how I typically do these type multi-occurance sessions. This is based off my system where item and cuni are the view fields.


Mark

cherokee
24th January 2005, 15:52
Mark,

Thanks it does work perfectly!.

Carlos