Overview
Monitoring Database Connections is essential to maintaining a reliable and efficient system. By keeping track of Database Connections, you can ensure your data is accessed and updated correctly. This page will present the methods used to maintain an efficient platformWhen the solution is running, and the Designer is connected with the runtime, the Datasets Monitor page show basic status server access to tables and queries.
On this page:
Table of Contents | ||||
---|---|---|---|---|
|
Datasets Monitor Table
The Datasets Monitor provides a way to monitor real-time information related to the Dataset module operation. The Datasets Monitor is a monitoring-only function, and only will be available when the solution is running, and the Designer is connected with that runtime solution.
The monitoring table will show status of the Server (not clients) operations performed by DatasetTables and DatasetQueries.
The information in this table is constructed from the runtime properties of the DatasetTable and DatasetQuery objects. Additionally of showing in the monitor table, the properties can be accessed on Displays or Scripts, using the following syntax
|
Monitor information | Description |
---|---|
Name | DatasetTable or DatasetQuery name |
SourceID | Original ID in the DatasetQueries or DatasetTables configuration pages |
RowCount | The total number of rows of data |
Disable | If the object is disabled |
LastStatus | The status value of its last operation (zero success, otherwise error) |
LastStatusMessage | The message corresponding the last error |
In order to embed the monitoring within the application itself, or to get status of Client side commands, see the Dataset Runtime Attributes
In this section:
Monitoring Databases Connections
There are 3 used methods to ensure correct data access.
Is Started
Query Execution Time
Connection String
See each one of them in more detail in the sections below.
Is Started
This property indicates if the Dataset is initialized and connected to the database. You can use it to check if the dataset is currently running, see the example code below.
Code Block | ||||
---|---|---|---|---|
| ||||
bool isStarted = @Dataset.DB.YourDatabaseName.IsStarted; |
Query Execution Time
You can measure the execution time of a query by checking the time before and after executing the query. See the example code below.
Code Block | ||||
---|---|---|---|---|
| ||||
DateTime startTime = DateTime.Now; @Dataset.Query.YourQueryName.SelectCommand(); DateTime endTime = DateTime.Now; TimeSpan executionTime = endTime - startTime; |
Connection String
You can check the connection string used for the database to ensure it is configured correctly. See the example code below.
Code Block | ||||
---|---|---|---|---|
| ||||
string connectionString = @Dataset.DB.YourDatabaseName.ConnectionString; |
YourDatabaseName
and YourQueryName
with the actual names of the database and query you are working on within the platform.In this section...Page Tree | ||||
---|---|---|---|---|
|