You might want to consider using db triggers, instead.  You could export
the contents from a db log table.

Another option would be to create a dataobject superclass that extends the
ND class, and then have your app-level data objects extend that.

Something like this (for classes that extend CSpMultiSQL):

class MyMultiSQL extends spider.database.CSpMultiSQL
{
/**
 * constructor accepts same args as CSpMultiSQL and  passes them up
*  also, probably, get reference to output stream to which to write log,
perhaps involving
* an argument that is not passed to the parent.
*/
public MyMultiSQl (SomeClass a, SomeOtherClass b, ...)
{
        super (a,b,....);
}//public MyMultiSQl (SomeClass a, SomeOtherClass b, ...)

/**
 * trap calls to executeInsert and write log if  successful
*/
public final int executeInsert() throws Exception
{
int command = super.executeInsert();

//don't bother checking success if return code not PROCEED
switch(command)
{
        case PROCEED:
                break;
        default:
                return (command)
}//switch(command)

if (succeeded())
{
        //write to log file
}//if (succeeded())

return(command);        

}//public final int executeInsert() throws Exception



}//class MyMultiSQL extends spider.database.CSpMultiSQL

-- Curt Springer, Team ND

At 07:45 PM 5/14/99 -0800, [EMAIL PROTECTED] wrote:
>I am looking for some code to write to a log text file every time a record
or records is updated, deleted, or inserted.  Just one log 
>file with a new line added every time there is a change to the database...
>
>
>Thanks,
>
>
>Huy Tran
>Boston Internet Technologies, LLC
>_________________________________________________________________________
>
>For help in using, subscribing, and unsubscribing to the discussion
>forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>
>For dire need help, email: [EMAIL PROTECTED]
> 
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to