Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > AFS/DDC/OLE: Function servers

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
14%
200 - 500 GB
32%
500 - 800 GB
4%
800 - 1200 GB
4%
1200 - 1500 GB
11%
1500 - 2000 GB
14%
> 2000 GB
21%
Total votes: 28

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 23rd April 2018, 23:02
blanchap's Avatar
blanchap blanchap is offline
Senior Member
 
Join Date: Feb 2005
Location: Montreal, Qc, Canada
Posts: 133
blanchap is on a distinguished road
Baan: BaanIV c4 - DB: Oracle 10g - OS: HP-UX 11.23
stpapi.insert hangs

Hi,

trying to insert record in tfacp1110s000 with an AFS.

stpapi.put.field("tfgld1100m000", "tfgld100.year", str$(year.x))
stpapi.put.field("tfgld1100m000", "tfgld100.btno", btno.x)
rc = stpapi.find("tfgld1100m000", errmsg)
if rc <> 1 then
stpapi.end.session("tfgld1100m000")
end()
endif

stpapi.handle.subproc("tfgld1100m000", "tfgld1101s000", "add")
stpapi.continue.process("tfgld1100m000", errmsg)
if not isspace(errmsg) then
stpapi.end.session("tfgld1101s000")
stpapi.end.session("tfgld1100m000")
end()
endif

stpapi.put.field("tfgld1101s000", "tfgld101.year", str$(year.x))
stpapi.put.field("tfgld1101s000", "tfgld101.btno", btno.x)
stpapi.put.field("tfgld1101s000", "tfgld101.ttyp", ttyp.z)
rc = stpapi.find("tfgld1101s000", errmsg)
if rc <> 1 then
stpapi.end.session("tfgld1101s000")
stpapi.end.session("tfgld1100m000")
end()
endif

stpapi.handle.subproc("tfgld1101s000", "tfacp1110s000", "add")
stpapi.continue.process("tfgld1101s000", errmsg)
if not isspace(errmsg) then
stpapi.end.session("tfgld1110s000")
stpapi.end.session("tfgld1101s000")
stpapi.end.session("tfgld1100m000")
end()
endif

stpapi.put.field("tfacp1110s000", "tfacp200.ttyp", ttyp.z)
stpapi.put.field("tfacp1110s000", "tfacp200.docn", str$(seq.number))
stpapi.put.field("tfacp1110s000", "tfacp200.suno", str$(tdwsl750.suno))
stpapi.put.field("tfacp1110s000", "tfacp200.docd", str$(date.num()))
stpapi.put.field("tfacp1110s000", "screen.amnt", str$(tdwsl750.amnt))
stpapi.put.field("tfacp1110s000", "tfacp200.isup", tdwsl750.invn)
stpapi.put.field("tfacp1110s000", "tfacp200.vatc", "020")
stpapi.put.field("tfacp1110s000", "tfacp200.vaty", "2017")
stpapi.put.field("tfacp1110s000", "tfacp200.vatp", "11")
stpapi.put.field("tfacp1110s000", "way.bill", "1")
stpapi.put.field("tfacp1110s000", "weight", "1")
stpapi.put.field("tfacp1110s000", "unit", "LB")
rc = stpapi.insert("tfacp1110s000", true, errmsg)
if not isspace(errmsg) then
stpapi.end.session("tfacp1110s000")
stpapi.end.session("tfacp1101s000")
stpapi.end.session("tfgld1100m000")
end()
endif

ran it in debug and it's all ok until i reach the stpapi.insert
once i reach that line, it hangs. does not go anywhere. no error message.

am i missing something?

Thanks
Reply With Quote
  #2  
Old 25th April 2018, 05:03
tmannais's Avatar
tmannais tmannais is offline
Member
 
Join Date: Jul 2017
Posts: 98
tmannais is on a distinguished road
Baan: LN 10.5 - DB: MySQL - OS: Windows
Maybe it has a message/question that the program needs to acknowledge first before proceeding to the next line. In this case, there is nothing handle that situation so it waits forever. That is my first guess. I suggest you check this out.
Reply With Quote
  #3  
Old 25th April 2018, 15:29
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,135
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
We are on 4c4. Below is snippet of code of my code for one session.

Code:
|Active the tfacp1110s000 session.
	stpapi.continue.process("tfgld1101s000", e.msg)
	
| Clear insert mode.
	stpapi.save("tfacp1110s000",e.msg)
| Add the new record - note isup and refr must be unique on our system.
	stpapi.put.field("tfacp1110s000", "tfacp200.suno", strip$(tfudi030.suno))
	stpapi.put.field("tfacp1110s000", "tfacp200.isup", str$(tfudi030.isup))
	stpapi.put.field("tfacp1110s000", "tfacp200.docd", str$(date.num()))
	stpapi.put.field("tfacp1110s000", "tfacp200.refr", tfudi035.pref & str$(sel.refr))  
	stpapi.put.field("tfacp1110s000", "screen.amnt", str$(round(tfudi030.amnt, 2, 0))) 
	stpapi.put.field("tfacp1110s000", "tfacp200.reas", tfudi030.reas ) 
	stpapi.handle.subproc("tfacp1110s000", "tfacp1120s000", "add")
	rc = stpapi.insert("tfacp1110s000", 1, e.msg) 
	if not isspace(e.msg) then
		stpapi.end.session("tfacp1110s000") 
		return
	endif
|Insert the account on tfacp1120s000	
	stpapi.put.field("tfacp1120s000", "tfgld102.leac", tfudi030.leac) 
	rc = stpapi.insert("tfacp1120s000", 1, e.msg)
	if not isspace(e.msg) then
		stpapi.end.session("tfacp1120s000")
		hold.msg = e.msg
		stpapi.delete("tfacp1110s000", true, e.msg)
		e.msg = hold.msg
		stpapi.end.session("tfacp1110s000") 
		return
	endif
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #4  
Old 30th April 2018, 15:11
blanchap's Avatar
blanchap blanchap is offline
Senior Member
 
Join Date: Feb 2005
Location: Montreal, Qc, Canada
Posts: 133
blanchap is on a distinguished road
Baan: BaanIV c4 - DB: Oracle 10g - OS: HP-UX 11.23
thanks for all the info.
problem was a missing value
Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Server hangs but keeps on pinging arbutt Operating Systems & Databases 2 14th July 2014 21:45
stpapihand dll too old ? stpapi.insert gives errors dogueke AFS/DDC/OLE: Function servers 5 4th June 2004 12:03
bdbreconfig hangs... r_nagu Tools Development 9 2nd June 2004 20:33
stpapi.insert hangs tbischo AFS/DDC/OLE: Function servers 10 18th May 2004 18:46
stpapi.insert / stpapi.save .....??????? rohan_rege AFS/DDC/OLE: Function servers 7 12th September 2002 19:39


All times are GMT +2. The time now is 12:28.


©2001-2018 - Baanboard.com - Baanforums.com