Subject | Use custom UDF OutputDebugString |
---|---|
Author | GrumpyRain |
Post date | 2004-11-30T22:09:11Z |
--- In firebird-support@yahoogroups.com, "Wayne Forrest" <wayne@b...>
wrote:
source but my work owns it, not me. Basically, we create a function
called FB_ODS(msg : String) that is a wrapper around the windows
OutputDebugString API call, about 3 lines of code.
We then use Dbgview from www.sysinternals.com or Delphi to watch the
messages sent. Basically all you do inside the SP/trigger is add the line
dummy = FB_ODS('Variable A=' || :A);
A good idea is to prefix the string with something you can filter by
in Dbgview, because when you get multiple triggers firing, it can be a
bit confusing which trigger sent what, so something like:
dummy = FB_ODS('SP_test:Variable A=' || :A);
then you can automatically only watch messages from SP_test. The other
advantage is that if you like, you can have a second version of the
UDF where the FB_ODS function is a dummy function that does nothing,
so you can keep the "commentary" in there and it wont start appearing
on customers' computers.
Hope that is of some help
wrote:
> Alan, Thankx,,We have created a custom UDF for our application. I would give you the
>
> This is what I wanted,
>
> I want the message to come from a SQL trigger or Stored Proc.
>
> ________________________________
source but my work owns it, not me. Basically, we create a function
called FB_ODS(msg : String) that is a wrapper around the windows
OutputDebugString API call, about 3 lines of code.
We then use Dbgview from www.sysinternals.com or Delphi to watch the
messages sent. Basically all you do inside the SP/trigger is add the line
dummy = FB_ODS('Variable A=' || :A);
A good idea is to prefix the string with something you can filter by
in Dbgview, because when you get multiple triggers firing, it can be a
bit confusing which trigger sent what, so something like:
dummy = FB_ODS('SP_test:Variable A=' || :A);
then you can automatically only watch messages from SP_test. The other
advantage is that if you like, you can have a second version of the
UDF where the FB_ODS function is a dummy function that does nothing,
so you can keep the "commentary" in there and it wont start appearing
on customers' computers.
Hope that is of some help