Manage structured data sources and queries.
Reference → Datasets | Tutorial | How-to Guide | Reference
Datasets Module (Reference) provides comprehensive database connectivity, query execution, and data management capabilities for the FrameworX platform. The Datasets Module enables:
The Datasets Module enables:
The module serves as the data storage backbone for Retentive Tags, Alarms Logging, Historian, and custom application data.
Section | Path | Purpose |
---|---|---|
DBs | Datasets → DBs | Database connections |
Queries | Datasets → Queries | SQL statements and procedures |
Tables | Datasets → Tables | Direct table operations |
Files | Datasets → Files | Recipe and text file management |
Step | Action | Location | Purpose |
---|---|---|---|
1 | Define connections | Datasets → DBs | Establish database links |
2 | Prepare queries | Datasets → Queries | Create SQL statements |
3 | Map tables | Datasets → Tables | Direct table access |
4 | Configure files | Datasets → Files | Recipe management |
Four system databases included in every solution:
Database | Purpose | Location |
---|---|---|
Retentive | Retentive tag values | <SolutionNameAndPath>.dbRetentive |
RuntimeUsers | Dynamic user management | <SolutionNameAndPath>.dbRuntimeUsers |
AlarmHistorian | Alarm and audit records | <SolutionNameAndPath>.dbAlarmHistorian |
TagHistorian | Time-series data | <SolutionNameAndPath>.dbTagHistorian |
SQLite databases are created automatically if they don't exist. Other database types must exist before connection.
TRunModule.exe (Dataset) handles:
TServer provides:
Dataset Module Thread:
TServer Database Threads:
Client Request Threads:
SQL statements with dynamic parameters:
sql
SELECT * FROM Production
WHERE BatchID = {{Tag.Batch_ID}}
Direct CRUD operations without SQL:
Text-based data exchange:
xml
<DataGrid DataSource="{Dataset.Query.ProductionQuery}" />
csharp
DataTable result = @Dataset.Query.MyQuery.SelectCommand();
@Tag.DataTableTag = result;
csharp
TK.CopyDataTableToTag(result, @Tag.Template);
Access Datasets → Monitor during runtime:
csharp
int status = @Dataset.Query.MyQuery.LastStatus;
string error = @Dataset.Query.MyQuery.LastStatusMessage;
int rows = @Dataset.Table.MyTable.RowCount;
The platform's parameterization:
Configure ServerIP for secure access:
The module provides multiple error detection methods:
Property Monitoring:
csharp
@Dataset.Query.Query1.SelectCommand();
if (@Dataset.Query.Query1.Error != "") {
// Handle error
}
Status Methods:
csharp
string status;
DataTable result = @Dataset.Query.Query1.SelectCommandWithStatusAsync(out status);
if (status != "OK") {
// Handle error
}
Connection Loss
Query Errors
Performance Issues
Module Down
Row Limiting Examples:
SQL Server:
sql
SELECT TOP 10 * FROM table
SQLite:
sql
SELECT * FROM table LIMIT 10
Oracle:
sql
SELECT * FROM table FETCH FIRST 10 ROWS ONLY
NCHAR columns limited to 1999 bytes (auto-adjusted)
→ Modules / Business Operations / Datasets Module → Tutorials / Business Operations / Datasets Module Tutorial → How-to Guides / I Business Operations / Datasets Module How-to Guide → Technical Reference / Business Operations / Datasets Module ReferenceDatasets Module Links
Explanation - to understand concepts
Tutorials - to learn by doing
How-to Guides - to accomplish specific tasks
Reference - technical details