Page 1 of 1

how to tell if dbmonitor is running

Posted: Thu 13 Dec 2012 21:27
by ccmcbride
environment:
delphi xe3
codesite installed and enabled
sDac 6.5.10
dbmonitor 3.0.3

I am working on a web service application that accesses data using sdac components.
during development, I have logic like this:
qryMonitor.active := debugon.

if dbmonitor is not running, I get port/socket errors :
cannot connect to server on host 'localhost'
no connection could be made becasue the targe machine actively refused it
socket error code 10061.

this error does not occur if I do not turn on monitoring, or if I have dbmonitor running.
so, how can I tell if dbmonitor is running so I can check for it before attempting to turn on the monitorind?

Re: how to tell if dbmonitor is running

Posted: Mon 17 Dec 2012 14:18
by AndreyZ
Hello,

Such behaviour is correct. If TMSSQLMonitor.Active is True and there is no DBMonitor running or TMSSQLMonitor.DBMonitorOptions.Port is incorrect, the 'Socket error 10061' error is generated. You will see this error only if you run your application from IDE. You will not see this error when you run the executable file of your application.
If you run your application from IDE, you will see all exceptions, handled and unhandled. If you run the executable file of your application, you will see only unhandled exceptions. If you do not want to see handled exceptions when running your application from IDE, you can disable the 'Notify on language exceptions' IDE option. To disable this option, you should open the Tools->Options IDE menu, go to the Language Exceptions tab, and uncheck the 'Notify on language exceptions' checkbox. After this, you will not see the 'Socket error 10061' error.