Right after I sent this, I realized that you can't add arguments to the
constructor of a superclass because it is ND that calls the constructor,
not your app code.  You could hard-code the output info, or pick it up in
'init' or 'afterinit' processing.

-- Curt Springer, Team ND

>Mailing-List: contact
[EMAIL PROTECTED]; run by ezmlm
>Delivered-To: mailing list
[EMAIL PROTECTED]
>X-Sender: [EMAIL PROTECTED]
>X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0
>Date: Fri, 14 May 1999 23:40:47 -0400
>To: [EMAIL PROTECTED]
>From: Curt Springer <[EMAIL PROTECTED]>
>Subject: Re: [ND] writing to text file
>
>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]
> 
_________________________________________________________________________

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