Monitors dynamic SQL execution in applications that use dotConnect for Zoho Desk.
This sample shows how to enable SQL monitoring in console and web applications. To activate monitoring for web applications, a Devart.Data.ZohoDesk.ZohoDeskMonitor object may be added to the Application collection at the first load of the default page.
|
|---|
// Console application
[MTAThread]
static void Main(string[] args)
{
ZohoDeskMonitor ZohoDeskMonitor = new ZohoDeskMonitor();
ZohoDeskMonitor.IsActive = true;
...
}
// Web application
void Page_Load(object sender, EventArgs e)
{
if (Application["mon"] == null)
Application.Add("mon", new Devart.Data.ZohoDesk.ZohoDeskMonitor() {IsActive = true});
} |
|
|---|
' Console application
<MTAThread()> _
Sub Main()
Dim ZohoDeskMonitor As ZohoDeskMonitor = New ZohoDeskMonitor
ZohoDeskMonitor.IsActive = True
...
End Sub
// Web application
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Application("mon") Is Nothing Then
Application.Add("mon", New Devart.Data.ZohoDesk.ZohoDeskMonitor() With {.IsActive = True})
End If
End Sub |