vaishali_sftdev
10th August 2009, 12:43
Hi all,

Pl find attached screenshot for error. The error occurs in before.write event of main.table.io section. In this event I am just assigning values to some of the fields of main table. whenever i insert a new record and save, this error is seen. What can be the possible reason. Reply ASAP.

bdittmar
10th August 2009, 12:57
Hi all,

Pl find attached screenshot for error. The error occurs in before.write event of main.table.io section. In this event I am just assigning values to some of the fields of main table. whenever i insert a new record and save, this error is seen. What can be the possible reason. Reply ASAP.

Hello,

maybe the wrong datatype is used.
Expected = STRING ?

Regards

manish_patel
10th August 2009, 12:59
Could you please upload your code?

And also check http://www.baanboard.com/baanboard/showthread.php?t=15464&highlight=error+391

vaishali_sftdev
10th August 2009, 13:06
Thanks for quick responses.

@bdittmar: pl ignore that error. It occured in another session that i previously executed..

Code is as follows:

before.program:
import("tdlnt151.cjcn",tdlnt154.cjcn)
import("tdlnt151.orno",tdlnt154.orno)

field.tdlnt154.orno:
before.field:
tdlnt154.orno = tdlnt151.orno

main.table.io:
before.write:
tdlnt154.amnt = round(tdlnt154.amnt,1,0)
tdlnt154.amnt = round(tdlnt154.amnt,1,0)
tdlnt154.ramt = round(tdlnt154.ramt,1,0)
tdlnt154.camt = round(tdlnt154.camt,1,0)
tdlnt154.aqua = tdlnt154.cqua

before.rewrite:
tdlnt154.amnt = round(tdlnt154.amnt,1,0)
tdlnt154.ramt = round(tdlnt154.ramt,1,0)
tdlnt154.camt = round(tdlnt154.camt,1,0)
if tdlnt154.aqua = 0.0000 then
on.old.occ(GetOldValue)
tdlnt154.aqua = old.aqua
endif

functions:
function GetOldValue()
{
old.aqua = tdlnt154.aqua
}

manish_patel
10th August 2009, 14:04
For which field it is throwing error?
What is the value of tdlnt154.cqua field?

vaishali_sftdev
11th August 2009, 05:06
cqua is table field. So, it gets value entered by he user....
I had checked the link u said.. but there is no such field which has null value..
Yes, i have debugged.. after the last statement in before.write when I click on Next/ Step.. It always show "Cannot continue" and when I quit then it shows me the errors as in the attached file..

manish_patel
11th August 2009, 06:19
If you have removed a field from table definition but that field still exists in physical table at the database level (i.e. may be due to unsuccessful CRDD).