Retrieve whether a RealTime field allows full reads and writes
- Last UpdatedApr 08, 2026
- 1 minute read
This scenario guides you through the steps required to retrieve whether a RealTime database (RTDB) field allows full reads and writes.
Whenever you create a field, which is an array of structures, and you do not mention an explicit field name from the structure, then read and write will not be allowed through normal read and write functions. For example, the broadcast field inside the connection table is an array of the Broadcast_entry structure, so the proper field name would be broadcast[1].last_sent.
To identify the code associated with each step, see the code comments in the Example code section.
Before you begin
- Review the list of additional namespaces needed for this scenario.
using System; using OASySDNA.RealTime.Data.Common.HighPerformanceDBWrapper; using OASySDNA.RealTime.Data.Common.HighPerformanceDBWrapper.Interfaces; using OASySDNA.RealTime.Data.Common.HighPerformanceSetDBWrapper;
To retrieve if a field allows full reads and writes
- Open the Program.cs file from the created project.
- Open the RTDB.
- Get the selected field for the input table.
- Get the name and if the field allows for reads and writes.
Example code
IRealTimeDatabase database = new RealTimeDatabase();
try
{
// Open the RTDB.
if (!database.IsOpen())
{
database.Open();
}
// Get the selected field for the input table.
var curvalField = new RealTimeField("analog", "curval");
// Get the name and if the field allows full reads and writes.
Console.WriteLine(quot;{curvalField.HPDBRealTimeField.Name} field allows full reads and writes:{curvalField.HPDBRealTimeField.AllowReadsAndWrites}");
}
catch (Exception ex)
{
Console.WriteLine(quot;An error occurred while getting the field information: {ex.Message}");
}