View Single Post
  #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