grajenda
24th February 2004, 13:18
what is the diff btw calling a funciton directly and calling with "with.object.set.do " function? and which one is prefferred?

How to call one DAL function from another DAL?

regards,
James

~Vamsi
24th February 2004, 19:11
with.object.set.do is equivalent to using on.main.table. The usage of this is warranted when you do a select on the main table so that the record pointer is not lost.

Rajasekhar
24th February 2004, 19:21
Hi Rajendar,
There is a difference between with.object.set.do and just executing the function.
Let us say you are working with main table. In which you are inserting data with some validations which includes the saved record also. But you don't want to commit the transaction if something is going wrong. At that time you can call the function with with.object.set.do and error comes you can abort that transaction. Otherwise you need to commit that transaction and do the checks if not then you have to delete that record or update again with old values.

The best example to take from Baan is release to invoicing should be always next activity number to the release to warehousing. At this case the system don't know the activity number to compare unless he saves data to the main table. But if he use with.object.set.do system buffer values changed so that the new record is taken into consideration to validate even before we commit that transaction.

Dal is just a library function with just one include <bic_dam>.
So you can like that dal as another dll or function and call all the external functions defined in the called DAL or you can use some defines given by DAL and function dal.start.business.method also.