depp_baan
13th February 2002, 14:17
Does anybody have experience in updating records in Baan 5.0c using stpapi.
We try to update general items using the sessions tcibd0501m000 and tcibd0101s000.
The following example of the "Developer's Guide for Application Function Server" does not work. We are not able to run the stpapi.find with success. It returns 1, but has found a wrong record.
-----------------------------------------------------------------------------------
stpapi.put.field("dtfsa1501m000", "dtfsa101.seno", str$(i.seno)
ret = stpapi.find("dtfsa1501m000", error.msg)
if ret = 1 then
ret = stpapi.synchronize.dialog("dtfsa1501m000", "modify", error.msg)
if ret then
stpapi.put.field("dtfsa1101s000", "dtfsa101.name", new.name)
ret = stpapi.update("dtfsa1501m000", true, error.msg)
if not ret then
ret = stpapi.recover("dtfsa1101s000", error.msg)
endif
endif
stpapi.end.session("dtfsa1501m000", error.msg)
-----------------------------------------------------------------------------------
We have 5.0c with SP6.
Thank you for your help.
We try to update general items using the sessions tcibd0501m000 and tcibd0101s000.
The following example of the "Developer's Guide for Application Function Server" does not work. We are not able to run the stpapi.find with success. It returns 1, but has found a wrong record.
-----------------------------------------------------------------------------------
stpapi.put.field("dtfsa1501m000", "dtfsa101.seno", str$(i.seno)
ret = stpapi.find("dtfsa1501m000", error.msg)
if ret = 1 then
ret = stpapi.synchronize.dialog("dtfsa1501m000", "modify", error.msg)
if ret then
stpapi.put.field("dtfsa1101s000", "dtfsa101.name", new.name)
ret = stpapi.update("dtfsa1501m000", true, error.msg)
if not ret then
ret = stpapi.recover("dtfsa1101s000", error.msg)
endif
endif
stpapi.end.session("dtfsa1501m000", error.msg)
-----------------------------------------------------------------------------------
We have 5.0c with SP6.
Thank you for your help.