MrSerbest
30th June 2007, 01:01
I am trying use this function server with and getting an error when compiling (Error: Unresolved reference to function 'stpapi.handler.subproc'.
Here is the code I'm using:
stpapi.put.field("tiflk0202m001","kalt.f",str$(kalt.f))
stpapi.put.field("tiflk0202m001","kdrm.frm",str$(kdrm.f))
stpapi.update("tiflk0202m001",err)
stpapi.handle.subproc("tiflk0202m001","tiflk0203s000","add")
stpapi.continue.process("tiflk0202m001", err.desc)
stpapi.get.field("tiflk0203s000","lot.message",clot.ack)
stpapi.end.session("tiflk0203s000")
stpapi.end.session("tiflk0202m001")
mark_h
1st July 2007, 03:43
The function is stpapi.handle.subproc - looks like you forgot the proc.
MrSerbest
2nd July 2007, 00:40
I m editing subproc but getting an error when compiling
(Error: Unresolved reference to function 'stpapi.handler.subproc'.
Here is the code I'm using:
Code:
stpapi.put.field("tiflk0202m001","kalt.f",str$(kalt.f))
stpapi.put.field("tiflk0202m001","kdrm.frm",str$(kdrm.f))
stpapi.update("tiflk0202m001",err)
stpapi.handle.subproc("tiflk0202m001","tiflk0203s000","add")
stpapi.continue.process("tiflk0202m001", err.desc)
stpapi.get.field("tiflk0203s000","lot.message",clot.ack)
stpapi.end.session("tiflk0203s000")
stpapi.end.session("tiflk0202m001")
mark_h
2nd July 2007, 03:42
Did you copy the code into the post? Is this the actual error - "'stpapi.handler.subproc"? Make sure your code does not have that extra "r" in the code.
Otherwise post the complete code into your next post. To me it looks like you are just mis-spelling a command.
MrSerbest
2nd July 2007, 07:41
function tested.api()
{
string err
domain tcdsca err.desc
domain tcpdno pdno.f
domain tdilc.loca loca.f
domain tiqep3 qdlv.f
domain tcmcs.str30 ack1.f
domain tcmcs.str30 ack2.f
domain tcmcs.str30 ack3.f
domain tcmcs.str30 ack4.f
domain tcmcs.str1 kalt.f
domain tcmcs.str10 kdrm.f
domain tcmcs.str45 clot.ack
|domain tcmcs
loca.f="KABULLOK"
long error
error=1
pdno.f = 990544
loca.f = "KABULLOK"
qdlv.f = 0.001
ack1.f = "Test"
ack2.f = "Test"
ack3.f = "Test"
ack4.f = "Test"
kalt.f = "1"
kdrm.f = "Durum"
string stradd
stradd = "add"
stpapi.put.field("tiflk0202m001","pdno.f",str$(pdno.f))
stpapi.put.field("tiflk0202m001","loca.frm",str$(loca.f))
stpapi.put.field("tiflk0202m001","qdlv.frm",str$(qdlv.f))
stpapi.put.field("tiflk0202m001","ack1.frm",str$(ack1.f))
stpapi.put.field("tiflk0202m001","ack2.frm",str$(ack2.f))
stpapi.put.field("tiflk0202m001","ack3.frm",str$(ack3.f))
stpapi.put.field("tiflk0202m001","ack4.frm",str$(ack4.f))
stpapi.put.field("tiflk0202m001","kalt.f",str$(kalt.f))
stpapi.put.field("tiflk0202m001","kdrm.frm",str$(kdrm.f))
stpapi.put.field("tiflk0202m001","lkln.f",str$(lkln.f))
stpapi.put.field("tiflk0202m001","rkln.f",str$(rkln.f))
stpapi.put.field("tiflk0202m001","mkln.f",str$(mkln.f))
stpapi.put.field("tiflk0202m001","lagr.f",str$(lagr.f))
stpapi.put.field("tiflk0202m001","ragr.f",str$(ragr.f))
stpapi.put.field("tiflk0202m001","magr.f",str$(magr.f))
stpapi.update("tiflk0202m001",err)
stpapi.handle.subproc("tiflk0202m001", "tiflk0203s000", "add")
stpapi.continue.process("tiflk0202m001", err.desc)
stpapi.get.field("tiflk0203s000","lot.message",clot.ack)
stpapi.end.session("tiflk0203s000")
stpapi.end.session("tiflk0202m001")
}
mark_h
2nd July 2007, 13:35
First have you tried ttstpcreatdll on tiflk0202m001? See if you get the same compile error. If you are still getting that error message - you will need to contact support. The code I see above should at least compile.
You do have ttstpapihand attached to the session or in a pragma used statement? I usually use "#pragma used dll ottstpapihand"
MrSerbest
2nd July 2007, 21:02
thanks mark_h
mark_h
2nd July 2007, 21:13
Did you get it to work? If so, what exactly was it?
MrSerbest
2nd July 2007, 21:21
No. it s don't work
MrSerbest
2nd July 2007, 21:52
I don't find api error list
have you error list
i this code running in vb.net or c#.net
handle.subproc returned -10 error
MrSerbest
2nd July 2007, 22:50
I find it problem in archive
mark_h17th July 2002, 04:07
Hi Lisa,
I am definitely not a Baan 5 guru - but could it possibly be a stpapi.zoom instead of stpapi.handle .subproc? The reason I say this is that I had one function server (4c3) that the code started a sub-session and stpapi.handle.subproc would not work. I had to use stpapi.zoom to get it to work. Just a wild guess.
mark_h
3rd July 2007, 03:28
Wow - I forgot all about that. Glad you found an answer. I do not not of an error list for something like the -10. I was suprised it would not compile.