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 Tags, Alarms, 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 |
<ac:structured-macro ac:name="info"> ac:rich-text-body SQLite databases are created automatically if they don't exist. Other database types must exist before connection. </ac:rich-text-body> </ac:structured-macro>
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;
Configure ServerIP for secure access:
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)
→ [Dataset Engine] - Internal operations → [Dataset Security] - SQL injection prevention → [Data Management] - Concurrency handling → [Dataset Namespace] - Runtime properties