learner
28th February 2007, 19:33
Hi,

Basically i am calling a dll from my session UI, and this dll which is getting called is inserting data via function dal.new and because of duplicate rec. dal.new is throwing error 100 which is perfectly fine, but problem is that i am not able to get error message string, iam only getting error code

code goes here

dal.new("tdsls400",ttdsls400, dal.error.code,1, db.retry, DB.RETURN.ERROR) |Line no. 1

if dal.error.code = 0 then |Line No. 2
commit.transaction() |Line No. 3
else |Line No. 4
string error.message(200) |Line No. 5
long ret.val, error.count |Line No. 6

error.count = dal.count.error.messages() |Line No. 7
ret.val = dal.get.error.message(error.message) |Line No. 8
abort.transaction() |Line No. 9

endif |Line No. 10
return(0) |Line No. 11



now in the above code Line no. 2 i.e. variable dal.error.code conatins value as 100 ( duplicate rec.) which is ok, where as Line no. 7 returns me 0 where as it should have returned me value as 1 because of 1 error , and in line no. 8 , the variable error.message is blank

I am confused as to why it is not retuning me error message ?

Waiting for your replies.

Regards

Learner