pralash
17th January 2018, 09:35
Hi,

I've create a DAL Script by using the object hooks....

Whenever perform any database operation through the session, the before.open.object.set hook is executed automatically in the DAL script...
After that the "before.get.object" hook is executed twice... But i'm not clearly understand that why the before.get.object hook is executed twice...

Can you please find the screen shot as well as my DAL script is follows, and advise me about this issue.

|******************************************************************************
|* tcemp103 0 VRC B61C a cust
|* DAL for Student
|* baan
|* 18-01-10 [17:32]
|******************************************************************************
|* Script Type: DAL
|******************************************************************************

#include <bic_dal2>

function extern long before.get.object( long dir )
{
dal.set.info.message("@%1s","Before get object")
show.dal.messages(MSG.INFO)
return(0)
}

function extern long after.get.object(long dir)
{
dal.set.info.message("@%1s","After get object")
show.dal.messages(MSG.INFO)
return(0)
}

function extern long before.open.object.set()
{
dal.set.info.message("@%1s","Before open object")
show.dal.messages(MSG.INFO)
return(0)
}

function extern long before.save.object(long type)
{
dal.set.info.message("@%1s","Before save object")
show.dal.messages(MSG.INFO)
return(0)
}

function extern long after.save.object(long type)
{
dal.set.info.message("@%1s","After save object....")
show.dal.messages(MSG.INFO)
return(0)
}

function extern long before.destroy.object()
{
dal.set.info.message("@%1s","Before Destroy object....")
show.dal.messages(MSG.INFO)
return(0)
}


function extern long after.destroy.object()
{
dal.set.info.message("@%1s","After Destroy object....")
show.dal.messages(MSG.INFO)
return(0)
}

manish_patel
19th January 2018, 09:18
How many record exists in main table?

pralash
19th January 2018, 09:48
Hi Manish,
There is no records in the main table....

Regards,
Pralash