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
12%
> 2000 GB
23%
Total votes: 77

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 18th October 2019, 10:25
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
Why can't I access my function?
Baan: Other/Unknown
C/S: None/Unknown

Hi,
When I'm in debug mode,fails to load the data from my tables and insert them into the table.
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
I tried to comment the select empty part, but gave me a error that I have duplicate records.
Can you help me?
Regards,
RavCoder
Reply With Quote
Sponsored Links
  #2  
Old 21st October 2019, 11:15
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
Update - Do I have to use a loop?

Hi,
I changed my code and now show me all fields, but I have the same values ​​repeated.
How do I enter different values? Do I have to make a loop? How do you do?
Code:
function insert_field_table(){
	db.retry.point()
select tdsls900.* , tdsls400.ofbp , tdsls400.odat, tdsls401.item, tdsls401.cups, tdsls401.orno, tdsls401.qoor
from tdsls900 for update, tdsls400 , tdsls401 
where tdsls900.bpid = :tdsls400.ofbp
and tdsls900.nama = :tccom100.nama

as set with 1 rows
selectdo

selectempty


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

db.insert(ttdsls900, db.retry)  
  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
 
|| Insert loop !?
commit.transaction()
endselect
			

}
Thanks and regards,
RavCoder
Reply With Quote
  #3  
Old 21st October 2019, 15:27
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,373
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Your db.insert goes after you assign the fields.
__________________
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
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
How to create an AFS pralash AFS/DDC/OLE: Function servers 7 11th October 2018 17:13
Error while opening opening purchase order naga ch Tools Administration & Installation 6 17th June 2016 23:42
How to call AFS in sp24? PV Ramone AFS/DDC/OLE: Function servers 4 2nd September 2008 12:06
xml question steveauckly Tools Development 4 27th July 2004 11:41


All times are GMT +2. The time now is 01:14.


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