Hi,

We have a problem with a view that gets closed somewhere along the process
of our program, but be have no clue where the error is. Is there some way to
trigger code that is excecuted when a view is closed so we can trap the
problem ? Something like a trigger for a table.

thankx
Xavier

Re: trigger on view by AA

AA
Fri Oct 20 10:07:59 CDT 2006

* Reports to the screen Event name, where it is called from and ;
* the parameter passed.
PROCEDURE dbc_AfterCloseTable ;
(cTableName)
? '>> ' + PROGRAM()
?? ' in ' + SUBSTR(SYS(16),RAT('\',SYS(16))+1)
? ' cTableName = ' + TRANSFORM(cTableName) + ' - ' ;
+ TYPE('cTableName')+' /end/ '
ENDPROC
You have to set events on for the database:
DBSETPROP('databasename','DATABASE','DBCEvents', .T.)
-Anders

"Nuyttens Xavier" <no.mail@mail.com> skrev i meddelandet
news:h35_g.139358$tN.2054252@phobos.telenet-ops.be...
> Hi,
>
> We have a problem with a view that gets closed somewhere along the process
> of our program, but be have no clue where the error is. Is there some way
> to trigger code that is excecuted when a view is closed so we can trap the
> problem ? Something like a trigger for a table.
>
> thankx
> Xavier
>



Re: trigger on view by Fred

Fred
Fri Oct 20 16:40:05 CDT 2006

If your code isn't doing to much data session switching, you could put a
breakpoint in the debugger on USED("yourview").

--
Fred
Microsoft Visual FoxPro MVP


"Nuyttens Xavier" <no.mail@mail.com> wrote in message
news:h35_g.139358$tN.2054252@phobos.telenet-ops.be...
> Hi,
>
> We have a problem with a view that gets closed somewhere along the process
> of our program, but be have no clue where the error is. Is there some way
> to trigger code that is excecuted when a view is closed so we can trap the
> problem ? Something like a trigger for a table.
>
> thankx
> Xavier
>



Re: trigger on view by Nuyttens

Nuyttens
Mon Oct 23 02:36:23 CDT 2006

Anders,

Look like this could do the trick !
Thanks alot

Xavier

"AA" <A@A> schreef in bericht
news:%23vq%23OmF9GHA.1168@TK2MSFTNGP03.phx.gbl...
>* Reports to the screen Event name, where it is called from and ;
> * the parameter passed.
> PROCEDURE dbc_AfterCloseTable ;
> (cTableName)
> ? '>> ' + PROGRAM()
> ?? ' in ' + SUBSTR(SYS(16),RAT('\',SYS(16))+1)
> ? ' cTableName = ' + TRANSFORM(cTableName) + ' - ' ;
> + TYPE('cTableName')+' /end/ '
> ENDPROC
> You have to set events on for the database:
> DBSETPROP('databasename','DATABASE','DBCEvents', .T.)
> -Anders
>
> "Nuyttens Xavier" <no.mail@mail.com> skrev i meddelandet
> news:h35_g.139358$tN.2054252@phobos.telenet-ops.be...
>> Hi,
>>
>> We have a problem with a view that gets closed somewhere along the
>> process of our program, but be have no clue where the error is. Is there
>> some way to trigger code that is excecuted when a view is closed so we
>> can trap the problem ? Something like a trigger for a table.
>>
>> thankx
>> Xavier
>>
>
>



Re: trigger on view by Nuyttens

Nuyttens
Mon Oct 23 02:38:12 CDT 2006

Fred,

This would be great for testing in develop but in this case we need
something to watch a run-time version.

greetings
Xavier

"Fred Taylor" <ftaylor@mvps.org!REMOVE> schreef in bericht
news:%236QtNBJ9GHA.4224@TK2MSFTNGP02.phx.gbl...
> If your code isn't doing to much data session switching, you could put a
> breakpoint in the debugger on USED("yourview").
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "Nuyttens Xavier" <no.mail@mail.com> wrote in message
> news:h35_g.139358$tN.2054252@phobos.telenet-ops.be...
>> Hi,
>>
>> We have a problem with a view that gets closed somewhere along the
>> process of our program, but be have no clue where the error is. Is there
>> some way to trigger code that is excecuted when a view is closed so we
>> can trap the problem ? Something like a trigger for a table.
>>
>> thankx
>> Xavier
>>
>
>



Re: trigger on view by Fred

Fred
Mon Oct 23 10:24:07 CDT 2006

You may need to try to recreate the scenario in a place you can run the
debugger. Otherwise, you're left with the messy way of writing messages to
WAIT WINDOWS, ? values on the screen or MESSAGEBOXES in various places in
your code to try to locate the problem.

--
Fred
Microsoft Visual FoxPro MVP


"Nuyttens Xavier" <no.mail@mail.com> wrote in message
news:Ej__g.144042$TD4.2328682@phobos.telenet-ops.be...
> Fred,
>
> This would be great for testing in develop but in this case we need
> something to watch a run-time version.
>
> greetings
> Xavier
>
> "Fred Taylor" <ftaylor@mvps.org!REMOVE> schreef in bericht
> news:%236QtNBJ9GHA.4224@TK2MSFTNGP02.phx.gbl...
>> If your code isn't doing to much data session switching, you could put a
>> breakpoint in the debugger on USED("yourview").
>>
>> --
>> Fred
>> Microsoft Visual FoxPro MVP
>>
>>
>> "Nuyttens Xavier" <no.mail@mail.com> wrote in message
>> news:h35_g.139358$tN.2054252@phobos.telenet-ops.be...
>>> Hi,
>>>
>>> We have a problem with a view that gets closed somewhere along the
>>> process of our program, but be have no clue where the error is. Is there
>>> some way to trigger code that is excecuted when a view is closed so we
>>> can trap the problem ? Something like a trigger for a table.
>>>
>>> thankx
>>> Xavier
>>>
>>
>>
>
>