TMSSQLMonitor is not working...

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
BigAl66
Posts: 11
Joined: Thu 10 Feb 2011 18:28
Location: Germany

TMSSQLMonitor is not working...

Post by BigAl66 » Thu 10 Feb 2011 18:49

Hi,
I use des SDAC Components (Professional 5.00.0.4) together with the DBMonitor (3.0.3) in Delphi XE Professional. My OS is Win 7 Ultimate.

The TMSSQLMonitor-Component is not working in my application. Inside the IDE the events where transmitted to the DBMonitor. During runtime no message is logged.

Another thing I have is, that the queries, that where set to "Active" inside the IDE are not opened automaticaly when I start the runtime. I have to open them all manually (Query.Open).

When I create a new application everything works as expected!

What's going wrong? Any Idea?

AndreyZ

Post by AndreyZ » Mon 14 Feb 2011 16:25

Hello,

I have checked if DBMonitor (3.0.3) works under Windows 7 Ultimate with SDAC 5.0.0.4 in RAD Studio XE. It works without any problems. Please try the following:
- drop the TMSSQLMonitor component onto the form;
- turn the moDBMonitor option on;
- start DBMonitor before running your program.

Please check that you didn't set the TMSConnection.Options.KeepDesignConnected property to False. This property is used to prevent an application from establishing a connection on startup.

BigAl66
Posts: 11
Joined: Thu 10 Feb 2011 18:28
Location: Germany

Post by BigAl66 » Thu 17 Feb 2011 23:07

Hi,

I'm desperatet. No chance to get it work. In a new application it works perfect. The Monitor and the Connection are placed on a datamodule. I tried this also in a new application - there it works. I tried also to initialize the datamodule prior all other units - no chance. I compared all the compiler settings to the new application - they are identical.

I'm out of ideas... I also own the source of SDAC. Do you have some tips how to isolate the problem? What is the way, the messages are transfered to the DBMonitor? If I start the application outside the IDE the monitor logs the data as expected.

Please help, because I have verry complex SQL-Statements to debug. They sometimes where build dynamicaly during runtime. As I told you at the start of this post: I'm desperated...

PS: The SQLMonitor (option moSQLMonitor) is not working at all...

Best Regards

Alex

AndreyZ

Post by AndreyZ » Fri 18 Feb 2011 13:14

I still cannot reproduce the problem. Here are several methods that you can debug to check DBMonitor work (in the order of their invocation):
in the DASQLMonitor unit:
procedure TCustomDASQLMonitor.SetActive(Value: boolean); // Value must be True. Also here you can check that moSQLMonitor and moDBMonitor are in Options.
in the DBMonitorClient unit:
procedure TDBMonitor.AddEvent(Msg: TEventMessage); // here the thread that serves for writing messages to dbMonitor is created.
procedure TEventSendThread.Execute; // here actual writing of messages to dbMonitor is performed.

BigAl66
Posts: 11
Joined: Thu 10 Feb 2011 18:28
Location: Germany

Post by BigAl66 » Fri 18 Feb 2011 22:43

Ok, I've debugged the code and found, that the socket in TSocketMessagePacker cannot be opened:

FSocket := socket(AF_INET, SOCK_STREAM, 0);

FSocket results in -1. The error i get (GetSocketError) is 10106. I'm checking now why... If I find the reason I will report...

Alex

BigAl66
Posts: 11
Joined: Thu 10 Feb 2011 18:28
Location: Germany

Post by BigAl66 » Sun 20 Feb 2011 22:10

Hi,

everything is now working. I don't know exactly why. I just renamed my application (stored under a new name). I have not found the real problem. The first idea of all that read this is (I think) that the firewall has blocked the communication between the monitor and the application. But this is not the reason...

However... It works now :-)

Best Regards

Alex

AndreyZ

Post by AndreyZ » Mon 21 Feb 2011 09:14

It really looks like something was blocking your application. Please check your firewall and other software that you might have, like anti-malware programs, etc. Also try adding your application to the exclusion list of these programs.

Post Reply