king1980
23rd January 2010, 15:24
Hi ,

I am new to DAL programming,

I have written following code for insert record in area table

long retval
string err.mesg(20)
string ac(3),ad(15)
ac="ZZ"
ad="abc"
db.retry.point()
dal.new.object("tcmcs045")
dal.set.field("tcmcs045.creq", ac)
dal.set.field("tcmcs045.dsca", ad)

retval = dal.save.object("tcmcs045")
message("%s","tcmcs045.creq")
if retval < 0 then
retval = dal.get.error.message(err.mesg)
message("Error......!%s",err.mesg)
endif
commit.transaction()

But while executing i am getting MR_Index_out error.

Please help to resolve this error

Regards
kin1980

vahdani
23rd January 2010, 20:54
Hi,

the field is "tcmcs045.creg" and not "tcmcs045.creq"! You get the error as the field "creg" is mandatory and you leave it empty!

king1980
27th January 2010, 07:48
Hi vahdani,

After changeing the filed from creq to creg my script is working fine.

Thanks
king1980