Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 13th July 2016, 08:26
Amit_Jain's Avatar
Amit_Jain Amit_Jain is offline
Member
 
Join Date: Apr 2006
Location: Hyderabad - India
Posts: 71
Amit_Jain is on a distinguished road
Baan: baan IV,V LN - DB: SQL,Oracle9i - OS: windows 2003 server
Wrong Use of DAL Engine

Hi

My process session halts at dal.save.object (for new records) and I get an Application error "Wrong use of DAL Engine".

Is there any way by which we can suppress this error message, because this message stops the flow of baan program. A user has to exit or Ignore this error message to continue with then program.

refer my code snippet here:

Code:
select 	tiedm100.* 
	from 	tiedm100 
	where 	tiedm100._index1 = {:eitm, :revi}
	as set with 1 rows
	selectdo		
		return
	selectempty  
		dal.new.object("tiedm100")
		dal.set.field("tiedm100.eitm", eitm)
		dal.set.field("tiedm100.revi" ,  revi)
		dal.set.field("tiedm100.dsca" ,  dsca)
		if trim$(engi) <> "0" then
			dal.set.field("tiedm100.engi" ,  engi)
		endif
		if not isspace(indt) then
			dal.set.field("tiedm100.indt" ,  utc.indt)
		endif
		|if not isspace(exdt) then
		|	dal.set.field("tiedm100.exdt" ,  utc.exdt)
		|endif
		dal.set.field("tiedm100.unom" ,  val(unom))
		dal.set.field("tiedm100.uset" ,  uset)
		dal.set.field("tiedm100.csig" ,  csig)
		dal.set.field("tiedm100.cuni" ,  cuni)
		dal.set.field("tiedm100.dscb" ,  dscb)
		dal.set.field("tiedm100.dscc" ,  dscc)
		dal.set.field("tiedm100.dscd" ,  dscd)
		dal.set.field("tiedm100.rele" ,  tiedm.rele.indesign)
		dal.set.field("tiedm100.cwun" ,  "lbs")
		dal.set.field("tiedm100.wght" ,  val(wght))
		ret = dal.save.object("tiedm100", err.mess,db.return.error)
		if ret = 0 then
			error = 0
			commit.transaction()
		else
			dal.get.error.message(err.mess)
			status = seq.puts( err.mess & "|" & ts,fp2)	
			abort.transaction()
			counterbad = counterbad + 1
			error = 1
		endif
	endselect
__________________
_______________________
Amit

Last edited by bhushanchanda : 13th July 2016 at 10:10. Reason: Added code tags
Reply With Quote
  #2  
Old 13th July 2016, 10:11
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,286
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi,

What is the error message return by dal.get.error.message() and what is the return value of dal.save.object().

There is a possibility that record already exists or may be its due to bad data due to domain mismatch.

Instead of suppressing, you may try to solve the issue. For suppressing, you can try setting error.bypass = true
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #3  
Old 14th July 2016, 12:47
vahdani's Avatar
vahdani vahdani is offline
Guru
 
Join Date: Aug 2002
Location: Cologne, Germany
Posts: 418
vahdani is on a distinguished road
Baan: all - DB: all - OS: Unix / Win2K
Hi Amit,

I Think your dal.save.object() call is wrong. Especially the variable err.mess is not allowed in DAL2. Please use only
Code:
               ret = dal.save.object("tiedm100")
__________________
May the force be with you!
Reply With Quote
  #4  
Old 15th July 2016, 09:20
Amit_Jain's Avatar
Amit_Jain Amit_Jain is offline
Member
 
Join Date: Apr 2006
Location: Hyderabad - India
Posts: 71
Amit_Jain is on a distinguished road
Baan: baan IV,V LN - DB: SQL,Oracle9i - OS: windows 2003 server
Trial and error

Hi Vahdani

This code piece was a result of some Trial and error, which I did to suppress the error message popup. My original code has ret = dal.save.object("tiedm100").

@Bhushan: I am capturing return value and I know some of the data to be uploaded is not correct.
The problem is the size of data is big and I don't want my program to halt execution during upload.

I will try error.bypass=true and get back to you.

Thanks Vahdani and Bhushan for your valuable comments.
__________________
_______________________
Amit
Reply With Quote
  #5  
Old 15th July 2016, 11:09
vamsi_gujjula's Avatar
vamsi_gujjula vamsi_gujjula is offline
Senior Member
 
Join Date: Nov 2011
Location: hyderabad ; india
Posts: 240
vamsi_gujjula is on a distinguished road
Baan: ERPLN fp3 and 10.4 - DB: oracle - OS: Aix , Redhat linux 6
ret = dal.save.object("tiedm100", err.mess,db.return.error)

From the guide function long dal.save.object (string tbl.name [, long error.flag])

should have been dal.save.object("tiedm100",db.return.error)
__________________
Regards,
Vamsi
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
UEDLL for DAL2 Hooks pillai.ganesh Tools Administration & Installation 3 22nd April 2015 09:45
bpmdm001 DAL Sandy Blondino Tools Development 4 6th November 2014 15:12
DAL will be permanently Active Mode on ttaad4100 sujeetkumar Tools Administration & Installation 4 7th October 2014 20:14
When DAL 1 or DAL 2 in Infor LN 6.1 gget79 Tools Development 5 27th May 2009 10:23


All times are GMT +2. The time now is 22:57.


©2001-2017 - Baanboard.com - Baanforums.com