spartacus
11th August 2004, 10:59
Hi all,
there is a define "DALNEW(CLS,...)", and much more with "CLS".
What ist CLS, I tried to find a define for "CLS", but I didn't, may I found too much lines which use "CLS"
Thanks
malutz
11th August 2004, 14:29
Syntax
void dal.new( string class_name, long object_set, ref long retval, long prop_check [, long mode [, long eflag]] )
Description
Use this to add a new record to the database. The function encapsulates the db.insert() function with the DAL hooks of the object set. If the before.save.object() hook fails, the database operation is cancelled.
Arguments
class_name A string containing the name of the DAL.
object_set The ID of an open object set (if this ID is not known, use the table ID).
retval The return value of the object hooks (<0), of the db.insert() function (> 0), or 0 if the function is successful.
prop_check A boolean value that indicates whether or not property checks must be executed. If set to TRUE, the property checks are executed immediately before the before.save.object() hook. If set to FALSE, the property checks are not executed.
mode Set this to DB.RETRY if retry points and the SELECT FOR UPDATE statement are being used. The actual database action is postponed until the transaction is committed.
eflag For some errors, it is possible to indicate the action the system must perform when the error occurs. You use this argument to specify the required action(s). See Error handling.
Even though "CLS" just by it self doesn't make any sense to me. In what script did you see that? Standard or own? Is there maybe a function included that has a define for "CLS"?
:confused:
spartacus
12th August 2004, 08:31
It is a standard macro. See "imcs2000", or grep for "DALNEW" in capital letters.
malutz
12th August 2004, 08:46
Hej,
Now i know what it is. "CLS" is a parameter that is given to this define. "CLS" stands for the class name. For example "tdsls401". Within the define you see ##CLS##, this is the place your parameter gets inserted into.
#define DALNEW(CLS,...)
^ dal.new("##CLS##", t##CLS##, tcmcs2000.dal.error, ...)
^ if tcmcs2000.dal.error then
^ return(tcmcs2000.dal.error)
^ endif
Hope i could be of help.
:)
spartacus
31st August 2004, 08:07
Hi Marcel,
seems that you right, it's somehow a parameter for the definition.
Thanx
Spartacus