Subject Re: [IBO] SQL Monitor?
Author Chuck Belanger
Thanks, Jason!

What I am doing is:
1. just before setting IB_Monitor.Enabled := true, delete the previous
fixed file name ("TableDuplicationBug_SQL.log");
2. Enable the IB_Monitor
2. add line: DataMod.IB_Session1.OutputToMonitor('Current Session: ' +
IntToStr(TV.SessionID));
and that adds a line to the top of the file which is exactly what I needed.

3. Process the call to the routine being watched (AddTableAdHocRows)
4. IB_Monitor.Enabled := false; Turn off appending to log file.

If this intermittent bug (row duplication to a string grid (NextGrid)
from a query) occurs, then I have this particular user quick email me
the file. I have a number of those files in which there was no table row
duplication to compare with.

At some point, I may be asking about what I am seeing in those files.

Right now the user cannot create steps to duplicate, and neither the
support guy nor I can reproduce this. It seems to happen about 1 in 10 -
50 times of creating that string grid and calling the routine.

Chuck
> Chuck,
>
> The IBO SQL monitor doesn't produce a file. If a file is produced it is in
> your own code. If you are using the TIB_LogFiles object that is part of IBO
> then it won't ever overwrite anything. It only creates files and appends to
> them. There is a way that you can dump your own custom information to the
> SQL trace in order to work on profiling and tracing program details better.
> You have to turn on Client Tracing and in your application you call the
> TIB_Session OutputToMonitor method. (I hope I remembered the correct
> spelling.)
>
> Jason
>
> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
> Of Chuck Belanger
> Sent: Monday, January 7, 2013 1:45 PM
> To: IBObjects Listserve
> Subject: [IBO] SQL Monitor?
>
> Hi, Jason:
>
> I have an SQL Monitor being enabled and then disabled in my code where I
> am trying to troubleshoot a nasty but intermittent problem.
>
> When SQL monitor is enabled, does it write over the existing file or
> append to it, assuming the same file name?
>
> I would like to also save to that file the current status of a few
> variables. Is that possible based on what you do with that file with
> your code?
>
> Thanks,
>
> Chuck Belanger
>
>
> ------------------------------------
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>
>
>
> ------------------------------------
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more ! Yahoo! Groups Links
>
>
>
>