Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #11136

Re: Best way to find out where a field is changed

From "Karl-Heinz" <invalid@invalid.invalid>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Best way to find out where a field is changed
Date 2017-11-08 15:32 +0100
Message-ID <f6giuaFp5v3U1@mid.individual.net> (permalink)
References <ljg30ddi7e7rmdadn6v057r7khg9ji2fg8@4ax.com>

Show all headers | View raw


Hi Dick,

> We have the following issue. On rare occasions a field in an invoice
> table contains a different currency than it should contain.
>[...]
> I wonder what the best way would be to find out from where this field is
> changed. As we use ADS (in conjunction with separate DBF files) we may be
> helped with triggers but I never worked with these. Does anyone have
> experience  with it?

I have no experience with ADS triggers, but have you tried to trap the
server Notify() messages  ? Though my stack list shown wasn´t that clean as 
expected, i was able to identify that my #vorgang field change was initiated 
by a [Save] Pushbutton that writes the content of several controls to the 
server.


METHOD Notify ( kNotifyName, uDescription) CLASS dbAufgaben

     IF kNotifyName == NotifyFieldchange .AND. uDescription == #VORGANG

         IF AllTrim ( SELF:FIELDGET ( #VORGANG ) ) != "xyz"

            // something went wrong ...
             // now list the procname() stack.

             MsgInfo ( "Wrong value: '" + AllTrim( SELF:FIELDGET (
#VORGANG )) + "'" + crlf + ;
                        "Should be: 'xyz' ")

            ListStack()

         ENDIF

     ENDIF


     RETURN SUPER:Notify ( kNotifyName, uDescription)

-----------------

FUNCTION ListStack() AS VOID  PASCAL
LOCAL dwActivation := 1 AS DWORD


DO WHILE Psz2String(ProcName( dwActivation))  != NULL_STRING

     DebOut32 ( DToC ( Today()) + " " + Time() + "   " +
ProcFile(dwActivation) + "  " + Psz2String ( ProcName(dwActivation) ) + "  "
+;
                 "(" + NTrim(ProcLine(dwActivation))+ + ")"  )


     dwActivation ++

ENDDO

RETURN



regards
Karl-Heinz 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Best way to find out where a field is changed D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2017-11-07 15:32 +0100
  Re: Best way to find out where a field is changed "Karl-Heinz" <invalid@invalid.invalid> - 2017-11-08 15:32 +0100
    Re: Best way to find out where a field is changed D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2017-11-16 23:34 +0100
  Re: Best way to find out where a field is changed "Jamal" <noooospam@example.com> - 2017-11-16 18:14 -0500

csiph-web