Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
18%
200 - 500 GB
29%
500 - 800 GB
3%
800 - 1200 GB
8%
1200 - 1500 GB
8%
1500 - 2000 GB
11%
> 2000 GB
24%
Total votes: 79

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #16  
Old 17th October 2019, 12:58
tmannais's Avatar
tmannais tmannais is offline
Senior Member
 
Join Date: Jul 2017
Location: Thailand, Bangkok
Posts: 234
tmannais is on a distinguished road
Baan: LN 10.5, 10.6, 10.7 - DB: MSSQL - OS: Windows
Quote:
Originally Posted by RavCOder View Post
Ok, I created a report script and put before.layout, when I executed my script I have for example error 10000040 then I have error 0 and execute a loop that never finish, so I don't now if I have duplicate value or not.
So that might be where the issue arises. Try checking why the data is not being sent to the report detail properly. There maybe something important missing between these two.
Once the detail gets correct data for each record then the report will print out the correct data.
Reply With Quote
Sponsored Links
  #17  
Old 17th October 2019, 13:31
RavCOder's Avatar
RavCOder RavCOder is offline
Senior Member
 
Join Date: Jul 2019
Posts: 106
RavCOder is on a distinguished road
Baan: 10.3 - DB: SQL Server - OS: Windows
Maybe is my function to insert field because when I debug my script session don't access into and stop iteration.
this is the function:
Code:
function insert_field_table(){
	db.retry.point()
select tdsls900.* 
from tdsls900 for update
where tdsls900.bpid = :tdsls400.ofbp
selectdo


selectempty
tdsls900.bpid = ""
tdsls900.nama = ""
tdsls900.item = ""
tdsls900.cuni = ""
tdsls900.odat = 0
tdsls900.orno = ""
tdsls900.qoor = 0
db.set.to.default(ttdsls900)
 

  
  tdsls900.bpid = tdsls400.ofbp
  tdsls900.nama = tccom100.nama
  tdsls900.item = tdsls401.item 
  tdsls900.cuni = tdsls401.cups
  tdsls900.odat =  tdsls400.odat 
  tdsls900.orno = tdsls401.orno
  tdsls900.qoor = tdsls401.qoor
 
  db.insert(ttdsls900, db.retry)
commit.transaction()
endselect
				

}

if I comment the part of the select empty and execute script , gives me these error: -Fatal error :Error 100 (Duplicate value) on tdsls900121(Max retries (10) exceeded)
Can not continue in tdsls4400m000 in DLL : ottstp_stddll(__overloaded.commit.transaction)[commit.transaction]

Last edited by RavCOder : 17th October 2019 at 15:42.
Reply With Quote
  #18  
Old 18th October 2019, 10:32
tmannais's Avatar
tmannais tmannais is offline
Senior Member
 
Join Date: Jul 2017
Location: Thailand, Bangkok
Posts: 234
tmannais is on a distinguished road
Baan: LN 10.5, 10.6, 10.7 - DB: MSSQL - OS: Windows
Quote:
Originally Posted by RavCOder View Post
Maybe is my function to insert field because when I debug my script session don't access into and stop iteration.
this is the function:
Code:
function insert_field_table(){
	db.retry.point()
select tdsls900.* 
from tdsls900 for update
where tdsls900.bpid = :tdsls400.ofbp
selectdo


selectempty
tdsls900.bpid = ""
tdsls900.nama = ""
tdsls900.item = ""
tdsls900.cuni = ""
tdsls900.odat = 0
tdsls900.orno = ""
tdsls900.qoor = 0
db.set.to.default(ttdsls900)
 

  
  tdsls900.bpid = tdsls400.ofbp
  tdsls900.nama = tccom100.nama
  tdsls900.item = tdsls401.item 
  tdsls900.cuni = tdsls401.cups
  tdsls900.odat =  tdsls400.odat 
  tdsls900.orno = tdsls401.orno
  tdsls900.qoor = tdsls401.qoor
 
  db.insert(ttdsls900, db.retry)
commit.transaction()
endselect
				

}

if I comment the part of the select empty and execute script , gives me these error: -Fatal error :Error 100 (Duplicate value) on tdsls900121(Max retries (10) exceeded)
Can not continue in tdsls4400m000 in DLL : ottstp_stddll(__overloaded.commit.transaction)[commit.transaction]
It might be because you are inserting a record where all of the primary keys are already existed in the database hence the duplicate value error. Check if the values you are putting in are not a duplicate.
Reply With Quote
  #19  
Old 18th October 2019, 12:53
RavCOder's Avatar
RavCOder RavCOder is offline
Senior Member
 
Join Date: Jul 2019
Posts: 106
RavCOder is on a distinguished road
Baan: 10.3 - DB: SQL Server - OS: Windows
I tried to see but still nothing, I always see duplicate values ​​repeated an N times
Reply With Quote
  #20  
Old 18th October 2019, 13:28
tmannais's Avatar
tmannais tmannais is offline
Senior Member
 
Join Date: Jul 2017
Location: Thailand, Bangkok
Posts: 234
tmannais is on a distinguished road
Baan: LN 10.5, 10.6, 10.7 - DB: MSSQL - OS: Windows
Quote:
Originally Posted by RavCOder View Post
I tried to see but still nothing, I always see duplicate values ​​repeated an N times
Try adding

Code:
as set with 1 rows
under where clause and see if the infinite loop stops.
Reply With Quote
  #21  
Old 18th October 2019, 13:36
RavCOder's Avatar
RavCOder RavCOder is offline
Senior Member
 
Join Date: Jul 2019
Posts: 106
RavCOder is on a distinguished road
Baan: 10.3 - DB: SQL Server - OS: Windows
I tried also that and I put db.insert() on top of selectempty, but nothing has changed.
Maybe I shouldn't make a loop? Because maybe I just read a value at random, but I don't know exactly how to do it

Last edited by RavCOder : 18th October 2019 at 13:50.
Reply With Quote
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
Invoices printing issue-display last record with 2 lines tracylee Tools Development 7 20th October 2017 11:51
How can I duplicate session with its report but not Program Script? niralibaan Tools Development 3 5th February 2010 16:44
Duplicate Report Dian Ayu Tools Development 1 15th February 2007 08:56
solving recursion problems rmarles Tools Development 2 25th January 2005 22:23
Report giving duplicate records Haggis Tools Development 13 17th September 2002 04:08


All times are GMT +2. The time now is 19:41.


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