SQLData Object
The SQLData object is used to store and retrieve data from a SQL Server database. Typical applications for this object include basic recipe management and database capture of attribute values.
Click one of the following Help topics to navigate to information about that topic.
|
Topic Category
|
Topic Subcategory
|
Topic Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Overview
|
Topic Category
|
Topic Subcategory
|
Topic Details
|
|
|
|
|
The SQLData object provides an interface to a Microsoft SQL Server running on any computer on the network. You can configure the SQLData object to either connect to an existing SQL Server database table, or you can create a new SQL Server database and database table.
The database columns configured in the SQLData object can be assigned to any attribute in the Galaxy. These are called "assigned attributes." The object can read the database values of the selected SQL Server database record and write to the assigned attributes. Conversely, the object can read the assigned attribute values and write to the database by appending a new record or modifying the currently selected record. For information on data types for columns, see Data Types.
It is recommended that you use one SQLData object per SQL Server database table. In the case of a large table, a number of SQLData objects can be used to read and write a subset of data in the table, if required.
The SQL Server database table can have a maximum of 1024 columns or a maximum combined row size of 8060, depending on which limit is exceeded first. The SQLData object is limited by the database table limit.
A valid example would be: 5 Strings (5 x 512 = 2560), 10 Floats (10 x 4 = 40), 50 Integers (50 x 2 = 100) and 1000 Booleans (1000 x 1 = 1000), where the total row size is 3700.
The number of rows of the table is limited by the amount of storage space available on the server.
The SQLData object supports:
- AppEngine redundancy
- Redundancy provided by a RedundantDIObject object.
- Connection to the MSDE and Microsoft SQL Server database.
For general information on objects, including relationships, deployment, and alarm distribution, see the Integrated Development Environment (IDE) documentation. You can access the IDE Help (IDE.chm) from within the IDE by clicking Help Topics on the Help menu.
Related Topics
Configuration
Run-Time Behavior
Object Attributes
Error Messages and Codes
Data Types
The SQLData object can create the following column types:
- Boolean with size of 1
- Integer with size of 2
- Floats with size of 4
- DateTime with size of 8
- Timestamp with size of 8
- String with size of 512
The following table indicates the column type created in the Microsoft SQL Server database based on the selection for the SQLData object column data type:
|
SQLData Object Column Data Type
|
SQL Database Column Data Type
|
SQL Database Column Size
|
|
Boolean
|
bit
|
1
|
|
DateTime
|
datetime
|
8
|
|
Floats
|
floats
|
4
|
|
Integer
|
int
|
2
|
|
String
|
char (512)
|
512
|
|
Timestamp
|
datetime
|
8
|
Microsoft SQL Server user defined datatypes are not supported as column datatypes by the SQLData object. For information on SQL Server data types, see the Microsoft SQL Server documentation.
For attribute data type conversion, the SQLData object only supports conversion of similar types of data. Some data type conversions are not supported. For example, a DateTime value cannot be converted to a Boolean value. For information on attribute data types, see the Wonderware Application Server User’s Guide, available as on-line help (F1) from the IDE.
The following table shows the supported data type conversion from the assigned attributes to the SQLData object:
|
To:
From:
|
Boolean
|
DateTime
|
Float
|
Integer
|
String
|
Timestamp
|
|
MxBoolean
|
Y
|
X
|
Y
|
Y
|
Y
|
X
|
|
MxFloat
|
L
|
X
|
Y
|
L
|
Y
|
X
|
|
MxDouble
|
L
|
X
|
L
|
L
|
Y
|
X
|
|
MxInteger
|
L
|
X
|
Y
|
L
|
Y
|
X
|
|
MxString
|
V
|
V
|
V
|
V
|
Y
|
X
|
|
MxBigString
|
L
|
V
|
L
|
X
|
L
|
X
|
|
MxInternationalizedString
|
X
|
X
|
X
|
X
|
X
|
X
|
|
MxTime
|
L
|
Y
|
L
|
L
|
Y
|
X
|
|
MxElapsedTime
|
L
|
Y
|
L
|
L
|
Y
|
X
|
|
MxDataType
|
X
|
X
|
X
|
X
|
X
|
X
|
|
MxSecurityClassification
|
X
|
X
|
X
|
X
|
X
|
X
|
|
MxQuality
|
X
|
X
|
X
|
X
|
X
|
X
|
|
MxReference
|
X
|
X
|
X
|
X
|
X
|
X
|
|
MxStatus
|
X
|
X
|
X
|
X
|
X
|
X
|
|
MxCustomStruct
|
X
|
X
|
X
|
X
|
X
|
X
|
|
MxCustomEnum
|
X
|
X
|
X
|
X
|
X
|
X
|
|
Variant(Unspecified)
|
X
|
X
|
X
|
X
|
X
|
X
|
Table Key:
Y = Conversion is supported.
L = Conversion is supported. Data precision loss can occur.
V = Conversion is supported if the value format is the same as the column data type format. For example, in the conversion from MxString to Boolean, the MxString value of "true" equals 1 in Boolean.
X = Conversion is not supported.
The following table shows the supported data type conversion from the SQLData object to the assigned attributes:
|
From:
To:
|
Boolean
|
DateTime
|
Float
|
Integer
|
String
|
Timestamp
|
|
MxBoolean
|
Y
|
X
|
L
|
L
|
V
|
X
|
|
MxFloat
|
Y
|
X
|
Y
|
Y
|
V
|
X
|
|
MxDouble
|
Y
|
X
|
Y
|
Y
|
V
|
X
|
|
MxInteger
|
Y
|
X
|
L
|
Y
|
V
|
X
|
|
MxString
|
Y
|
X
|
Y
|
Y
|
V
|
X
|
|
MxBigString
|
Y
|
X
|
Y
|
Y
|
Y
|
X
|
|
MxInternationalizedString
|
X
|
X
|
X
|
X
|
X
|
X
|
|
MxTime
|
X
|
Y
|
L
|
L
|
V
|
X
|
|
MxElapsedTime
|
X
|
Y
|
L
|
L
|
V
|
X
|
|
MxDataType
|
X
|
X
|
X
|
X
|
X
|
X
|
|
MxSecurityClassification
|
X
|
X
|
X
|
X
|
X
|
X
|
|
MxQuality
|
X
|
X
|
X
|
X
|
X
|
X
|
|
MxReference
|
X
|
X
|
X
|
X
|
X
|
X
|
|
MxStatus
|
X
|
X
|
X
|
X
|
X
|
X
|
|
MxCustomStruct
|
Y
|
X
|
X
|
X
|
X
|
X
|
|
MxCustomEnum
|
X
|
X
|
X
|
X
|
X
|
X
|
|
Variant(Unspecified)
|
X
|
X
|
X
|
X
|
X
|
X
|
Table Key:
Y = Conversion is supported.
L = Conversion is supported. Data precision loss can occur.
V = Conversion is supported if the value format is the same as the column data type format. For example, in the conversion from MxString to Boolean, the MxString value of "true" equals 1 in Boolean.
X = Conversion is not supported.
Related Topics
Overview
Configuration
This table describes the object editor options for configuration and the associated attributes.
|
Topic Category
|
Topic Subcategory
|
Topic Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This object Help file does not include information about extensibility options that are common to all objects. For information on configuration options for the Object Information, Graphics, Scripts, Attributes tabs, see the Configuration Help. To access this Help file, click the Configuration Help link, which is located in the fixed header area that appears at the top of this Help file window.
Related Topics
Overview
Run-Time Behavior
Object Attributes
Error Messages and Codes
Database Configuration
Use the Database tab to configure the SQL Server database path and authentication details that the SQLData object will use when connecting to the database at configuration and run time.
The SQLData object is configured to connect to a single SQL Server database table. The object supports network browsing to the database server, selecting the database and subsequently locating the appropriate table. The object supports network browsing to locate the database table. Changing the table information automatically results in a disconnection from the database. The table definition is retained during disconnection to enable cloning of the database from the definition already loaded.
If the database or table does not exist on the selected node, the object will create the database and database table when you enter a valid table definition and click the Create Database button on the Design tab, or when the object is deployed.
You can configure the SQLData object to use one of three authentication modes: Windows Integrated Security, Windows Account, or SQL Server Authentication. For more information, see Database Authentication Modes.
As a database connection may not always be required when configuring the object in the IDE, a Test Connection button has been provided.
All errors associated with connecting to the database are sent to the logger.
Options are as follows. For more information about the attribute associated with each option, click the attribute link in parentheses.
Database Server Name (DBServerName)
The name of the SQL Server on which the database resides. To select from a list of all available nodes on the network, click the ellipsis button. Named server instances are not supported.
Database Name (DBName)
The name of the database that is used to store tables. The list includes all of the databases available for the selected node.
Table Name (DBTableName)
The name of the table in the database. The list includes all of the user tables available for the selected database.
Authentication Mode (AuthenticationMode)
The authentication mode that will be used to connect to the database. Available options are Windows Integrated Security, Windows Account, or SQL Server Authentication. For more information, see Database Authentication Modes.
If you select Windows Integrated Security, ArchestrA user details are used to connect to the database. If you select Windows Account, the Windows user account details in the object are used to connect to the database. The Domain, Username, and Password options will become available. If you select SQL Server Authentication, the SQL Server user account details in the object are used to connect to the database. The Username and Password options will become available.
Domain
The user authentication domain name for run-time and configuration-time SQL Server access.
Username
The user authentication username for run-time and configuration-time SQL Server access.
Password
The user authentication password for run-time and configuration-time SQL Server access.
Open Database in Read-Only Mode (DBReadOnly)
If enabled, only read-only access from the SQL Server database will be allowed. The SQLData object will not be able to modify either the database schema or the data.
Use Database View
Toggles between database view and table view.
Table Name/View Name
Select the table name or view name, depending on your Use Database View selection
Test Connection
Used to test the object’s connection to the database at configuration time. (There is no impact on run time.)
Related Topics
Configuration
Database Authentication Modes
You can configure the SQLData object to use one of three authentication methods:
- ArchestrA user authentication (uses the ArchestrA user credentials). The ArchestrA user authentication method impersonates the configured ArchestrA network user when connecting to the SQL Server database. For more information on ArchestrA user authentication, see the Integrated Development Environment (IDE) documentation.
- Windows user authentication (requires a valid Windows domain name, username and password). The Windows user authentication method impersonates the configured user in the SQLData object (domain name, username and password) when connecting to the SQL Server database.
- SQL Server user authentication (requires a valid SQL Server username and password). The SQL user authentication method impersonates the configured user in the SQLData object (username and password) when connecting to the SQL Server database.
The authentication method applies to both the configuration and run-time environment. The SQL Server must be configured to support the selected authentication method.
Related Topics
Database Configuration
Design Configuration
Use the Design tab to configure the database table and attribute relationship. That is, the column name, SQL data type, and the assigned attribute for each column.
Options are as follows. For more information about the attribute associated with each option, click the attribute link in parentheses.
Column Name
The column name that either exists or will be created in the SQL Server database. The column name is used to name the dynamic attribute associated with the column using the naming format tempColumnName. Bracketed or quoted identifiers are not supported. For example, "temp Param 1"
Existing column names are read from the database table and provided in a list. Unique names must be provided for each column in the database. The table definition is validated when you click the Modify Database or Create Database button.
Case-sensitive collations are not supported. The SQLData object treats upper-case or lower-case letters in the same way. For example, S = s, ColumnName = columnname, and so on.
SQL Data Type
The data type of the column in the SQL Server database. Select a data type from the list. Available data types include Boolean, Integer, Float, String, DateTime, and Timestamp.
The value of the attribute assigned to the column will be coerced if its data type is not the same data type as the column. The SQLData object does not generate a warning for columns configured with a data type mismatch. For more information on data types, see Data Types.
Selecting the data type for a column as Timestamp automatically inserts the current time in the field when the database record is modified. Attributes cannot be assigned to columns with the data type of Timestamp.
Assigned Attribute
The attribute assigned to the column for data transfer. Each database column configured in the SQLData object can be assigned to an attribute in the Galaxy. These types of attributes are called "assigned attributes." Columns not assigned to attributes are not modified by the object when performing a record replace; however, the default value for the data type is inserted by SQL Server when the object appends records. To access the Attribute Browser, click the ellipsis button.
Value in this Column are unique
If enabled, all values entered into the column will be unique. This selection sets a UNIQUE constraint in the database.
If the object attempts to save a record with a duplicated value in a unique column, an error is returned by the database. The "Record Already Exists" error is reported by the object (error attribute) and the database record is not modified.
Show Column in Data list view
If enabled, the column will be displayed in the database preview on the DataSheet tab. This allows you to select the visibility of each column when previewing the database at configuration time. This information is only used during configuration to enable you to customize the database table preview. This option has no impact at run time.
Add
Creates a new column in the database. After you have configured the options in the Column Configuration area, click Add, and a new column will be added to the table definition.
Update
Modifies an existing column in the table definition. Select the required column name in the table definition (this loads the column information into the Column Configuration options), modify the Column Configuration options. The editor automatically updates the table definition..
Delete
Deletes a column in the table definition. Select the required column name in the table definition (this loads the column information into the Column Configuration options), and then click Delete.
Get from Database
Reads the table definition from the database.
Use Runtime Query String (QueryStringEnable)
Select this check box to create the SQL Server query. For more information, see Run-Time Query String.
Query Column (QueryColumnName)
The column name used by the run-time query. The list includes all of the columns available for the current table.
Note Selecting the query column name does not automatically create a non-clustured index on this column. If you manually create such an index, it can improve retrieval performance.
Query Value (QueryColumnValue)
The default value used by the run-time query.
Identity Column Name
The column name used to ensure entity integrity of the records in the database. This column could also be the primary key column. By default SQL Server creates a clustered index on these columns.
Note The SQLData object only supports single column primary keys. There is no support for composite primary keys that are defined by more than one column.
This option is read-only if the identity column constraint already exists. This option defaults to "aa_id" if you are creating a new database or connecting to a database with no identity column constraint. For more information, see Identity Columns.
Table Definition
A list view of the table definition.
Related Topics
Configuration
Information Storage
The following options modify the database configuration:
When the table configuration is read from the database, the existing table definition is cleared, and the assigned attribute and visibility information for matching column names is preserved (that is, if a column name in the table definition matches a column name being read from the database, the assigned attribute and visibility information is retained).
The SQLData object can modify the data table without data loss. However, changing a data type will result in loss of precision (this is a function of SQL Server).
Related Topics
Design Configuration
Creating a New Database Table
To create a new database, simply specify the name of a database and/or database table that does not exist, and then click Connect. The object will confirm that the database does not exist, and the Create Database button on the Design tab will become available. Enter a table definition and an identity column name, and then click Create. If you do not enter a valid table definition, the object will not create the database table. You will then be prompted to enter a valid table definition.
Related Topics
Design Configuration
Connecting to an Existing Database Table
When connecting to an existing database, use the ellipsis button to select the database and table name of an existing database and click Connect. The object will confirm that the database exists, and the Get from Database button on the Design tab will become available. When you click Get from Database, the table definition of the database is loaded into the object's table definition. This includes the identity or primary key column name, which cannot be modified. For more information, see Identity Columns. You can define a table definition that does not include all of the columns in the database. This prevents access to columns in the database that have not been included in the table definition.
Related Topics
Design Configuration
Identity Columns
The identity (or primary key) column is used for record navigation, selected record access, and unique identification of records affected by bad data quality. You can specify the identity (or primary key) column name when you create a new database; however, once you have saved the column name to the database, you cannot modify the name.
When you connect to an existing database, the identity (or primary key) column name is automatically read into the Identity Column Name box. If the column name does not exist in the database table, the Identity Column Name box defaults to "aa_id," (but remains enabled for editing) and the Modify Database button becomes available. If the database configuration is not written to the database during configuration (that is, the Modify Database button is not clicked), the object adds the column name to the database when the object is deployed.
The identity (or primary key) column must be a unique column name in the database table. The constraint is saved in the database as Tablename.IdentityColumnName to ensure the column name is unique within the database. The identity (or primary key) column does not appear in the database preview.
If the identity (or primary key) column name is blank, the object will error.
Related Topics
Design Configuration
Run-Time Query String
The DBToAttrCmd, DBToTempCmd, and RecordDeleteCmd attributes execute a SQL Server query to select the record(s) in the database for transferring or deleting.
During configuration time, you can set the run-time query to use either a free format SQL Server string or the combination of a column name and column value. If you use a free format SQL Server query string, you must enter a valid SQL Server query into the QueryString attribute. The query executes as:
SELECT ALL WHERE QueryString
When using the combination of a column name and column value to query the database, you must enter a valid column name in the QueryColumnName attribute (this is typically set at configuration time) and the lookup value in the QueryColumnValue attribute. The query executes as:
SELECT ALL WHERE QueryColumnName = "QueryColumnValue"
The DBToAttrCmd and DBToTempCmd attributes return an error if more than one record is returned by the query and no values are transferred. To prevent a query returning multiple records when using the column name and column value query, the selection of a column name that is not configured to be unique generates a warning when the object is saved. This warning cannot be applied to the free format query string.
Note The RecordDeleteCmd attribute can be used to delete multiple records; therefore, no error is generated for this command if multiple records are returned by the query.
Related Topics
Design Configuration
DataSheet Configuration
Use the DataSheet tab to view data stored in the connected SQL Server database table.
The database preview allows you to enter a configurable SQL Server query to filter the preview of the database during configuration. You can use this SQL Server query to test your free format run-time query string.
Rows can be deleted from the database via the database preview.
Options are as follows.
Database Query
A valid SQL query. The result of query is written to the Data list view.
Refresh
Executes the database query and loads the selected database records into the Data list view. If the Database Query box is empty, all database records are loaded into the Data list view.
Delete Row
Deletes the selected row in the database table (deletes the database record). Select the row for deletion, and then click Delete Row.
Number of Records
The current number of records in the Data list view
Data
Displays the contents of the database query after a refresh. If the Database Query is blank, the refresh returns the entire contents of the database.
Related Topics
Configuration
Commands Configuration
Use the Commands tab to configure:
- The timer for database and attribute access.
- The security settings for run-time command attributes.
- The handling of the attribute when the attribute quality is not GOOD.
Options are as follows. For more information about the attribute associated with each option, click the attribute link in parentheses.
Database Write Timeout Preset (DBWriteTimeout)
The error time out period, in milliseconds, for database writes.
Attribute Write Inhibit Preset (AttrWriteInhibitDelay)
The time preset, in milliseconds, that is used to maintain the SemaphoreAttrWrite attribute as TRUE once a transfer to the assigned attributes has been initiated.
AttrToDBAppendCmd (AttrToDBAppendCmd)
The security configuration for this command attribute at run time.
AttrToDBReplaceCmd (AttrToDBReplaceCmd)
The security configuration for this command attribute at run time.
TempToAttrCmd (TempToAttrCmd)
The security configuration for this command attribute at run time.
TempToDBAppendCmd (TempToDBAppendCmd)
The security configuration for this command attribute at run time.
TempToDBReplaceCmd (TempToDBReplaceCmd)
The security configuration for this command attribute at run time.
DBToTempCmd (DBToTempCmd)
The security configuration for this command attribute at run time.
DBToAttrCmd (DBToAttrCmd)
The security configuration for this command attribute at run time.
AttrToTempCmd (AttrToTempCmd)
The security configuration for this command attribute at run time.
RecordDeleteCmd (RecordDeleteCmd)
The security configuration for this command attribute at run time.
RecordSelectNextCmd (RecordSelectNextCmd)
The security configuration for this command attribute at run time.
RecordSelectPreviousCmd (RecordSelectPreviousCmd)
The security configuration for this command attribute at run time.
ErrorsResetAllCmd (ErrorsResetAllCmd)
The security configuration for this command attribute at run time.
AttrWriteCompleteResetCmd (AttrWriteCompleteResetCmd)
The security configuration for this command attribute at run time.
TempAttrQualityResetCmd (TempAttrQualityResetCmd)
The security configuration for this command attribute at run time.
DiagnosticsResetCmd (DiagnosticsResetCmd)
The security configuration for this command attribute at run time.
Query String (QueryString)
The security configuration for this command attribute at run time.
Ignore Quality for AttrToDBReplaceCmd and AttrToDBAppendCmd (AttrToDBQualityIgnore)
If enabled, assigned attributes with a quality other than GOOD will be allowed to be transferred to the database using the AttrToDBAppendCmd and AttrToDBReplaceCmd command attributes.
Ignore Quality for TempToAttrCmd (TempToAttrQualityIgnore)
If enabled, temporary attributes with a quality other than GOOD will be allowed to be transferred to the assigned attributes using the TempToAttrCmd command attribute.
Ignore Quality for TempToDBReplaceCmd and TempToDBAppendCmd (TempToDBQualityIgnore)
If enabled, temporary attributes with a quality other than GOOD will be allowed to be transferred to the database using the TempToDBAppendCmd and TempToDBReplaceCmd command attributes.
Auto Connect to Database (DBAutoConnect)
If enabled, automatic connection to the database on initial startup and automatically re-connect to the database on demand will be allowed.
Related Topics
Configuration
Run-Time Behavior
The following table describes the Run-Time behavior of the object.
|
Topic Category
|
Topic Subcategory
|
Topic Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INSET_Run-time behavior pertains to the running state of a deployed object. Once deployed and operating, this object can assume one of the following states:
- Startup. This state describes the operations performed by the object when the object is being initialized. Data acquisition has not been started yet.
- Going onscan. This state describes the operations performed by the object when it is about to start the data acquisition process. Reading and writing to data items in the low-level device will immediately follow. The object will go into the Continuous execution state.
- Going offscan. This state describes the operations performed by the object when it is about to stop its data acquisition process. Reading and writing to data items in the low-level device will immediately stop. The object is going out of the Continuous execution state.
- Shutdown. This state describes the operations performed by the object when it is about to clean up its data connection and then stop the data acquisition process.
- Special set handling. This state describes the special operations supported by the object when it is set (written into).
- Continuous execution. This state describes the operations when the object is running.
Additional details regarding run-time behavior for this object are included in the following table:_INSET
|
State Change
|
Behavior
|
|
Startup
|
1. Checks if the database exists.
- If the database exists, the object attempts to make a connection.
- If the database does not exist, the object creates a new database with the name that you specify.
2. Checks if the required table exists in the database.
- If the table exists, the object attempts to make a connection.
- If the table does not exist, the object creates a new table with the name that you specify.
3. Checks if the required status table exists in the database. The status table is used to log errors in writing to other object attributes. If the SQLData object is writing to an attribute, and the attribute quality is any value other than GOOD, a log entry is generated. The log entry will contain the date, attribute name, and quality value.
- If the status table exists, the object attempts to make a connection to the status and the scan table.
- If the status table does not exist, the object creates a new table with name from the value of the DBTableName attribute plus "_Status" appended to the end. For example, if the DBTableName attribute is "XXX" then the status table name is "XXX_Status."
4. Creates dynamic attributes for data editing. There is one attribute for each of the editable fields in the table.
|
|
Going onscan
|
Writes date/time and onscan information to the logger.
|
|
Going offscan
|
Writes date/time and offscan information to the logger.
|
|
Shutdown
|
Disconnects from the SQL Server database.
|
|
Special set handling
|
None
|
|
Continuous execution
|
1. All command attributes are set to FALSE after an execution cycle.
2. If errors such as ErrorDBRead, ErrorDBWrite, ErrorDeletingDBRecord ErrorSelectNextRecord and ErrorSelectPreviousRecord occur, reset all commands.
3. If the SemaphoreAttrWrite attribute is TRUE, maintain a time delay and prevent further writing to object attribute values by another user.
4. If the SemaphoreDBWrite attribute is TRUE, maintain a time delay and prevent further modification to the record in the database by another user.
5. When writing values to object attributes and the attribute quality is not GOOD, the object will log the date, attribute name, and quality value in the status table for future reference.
|
For more details on run-time functionality, see the following sections:
Related Topics
Overview
Configuration
Object Attributes
Error Messages and Codes
Data Transfer Commands
If one of the Boolean command attributes (attributes with the suffix "Cmd") is set to TRUE, the SQLData object transfers values to and from the SQL Server database table to the assigned attributes or temporary attributes. The temporary attributes are dynamic run-time attributes that are automatically created for each column in the database table. The temporary attribute values can be transferred to and from the database table, as well as to and from the assigned attributes.
During run time, the DBToAttrCmd and DBToTempCmd command attributes select a record in the database before the database values are transferred. The selecting of a record uses a SQL Server query. For more information, see Run-Time Query String. If the query does not return one record (that is, either no record or multiple records), an error is generated and no data is transferred.
Each time database and temporary values are transferred to the assigned attributes, a Boolean flag is set to TRUE to indicate a successful data transfer. The flag is reset (set to FALSE) by a reset command, or by subsequent transfer to command attributes.
Related Topics
Run-Time Behavior
Database Navigation Commands
The Boolean commands RecordSelectNextCmd and RecordSelectPreviousCmd allow for scrolling of the database at run time. Scrolling does not use the active query (that is, it scrolls the entire database). The identity column provides the position information required to determine the next and previous records. The values of the selected record returned by the scroll operation are transferred to the temporary attributes.
Attempting to scroll past the last record in the database or before the first record in the database results in an error, and the temporary attribute values remain unchanged.
Using the RecordSelectNextCmd command attribute when no record is selected returns the first record in the database.
Using the RecordSelectPreviousCmd command attribute when no record is selected returns the last record in the database.
Related Topics
Run-Time Behavior
Database Record Delete Command
The SQLData object supports the deleting of records at run time. The run time query is used to select the records for deletion.
Related Topics
Run-Time Behavior
Database Write Semaphore
When the SQLData object initiates a data transfer to the database, a semaphore (SemaphoreDBWrite Boolean attribute) is set to TRUE. The semaphore prevents the object from performing multiple writes to the database within a preset time period. This prevents multiple users from writing to the database simultaneously. The semaphore can be used on the HMI to indicate that a database write is in progress.
Related Topics
Run-Time Behavior
Assigned Attribute Write Semaphore
When the SQLData object initiates a data transfer to the assigned attributes, a semaphore (SemaphoreAttrWrite Boolean attribute) is set to TRUE. The semaphore prevents the object from performing multiple writes to the assigned attributes within a preset time period. This prevents multiple users from writing to the assigned attributes simultaneously. The semaphore can be used on the HMI to indicate that an assigned attribute write is in progress.
Related Topics
Run-Time Behavior
Attribute Quality Handling
The SQLData object provides handling of assigned and temporary attributes with quality other than GOOD via the AttrToDBQualityIgnore, TempToAttrQualityIgnore, and TempToDBQualityIgnore attributes. When these attributes are enabled, attributes with quality other than GOOD are transferred to the database or to the assigned attributes.
Attribute values with quality other than GOOD are written to the status table with information such as attribute name, attribute quality, and database foreign key value for the associated record.
Related Topics
Run-Time Behavior
Diagnostic Status
The SQLData object provides status indicating the number of times the database has been accessed, the SQL session connection time, and the time taken to complete a database access command initiated by the object.
When the object initiates a data transfer to the database, a database write counter (DBWriteCnt Integer attribute) is incremented.
When the object fails to transfer data to the database, a database write failed counter (DBWriteFailedCnt Integer attribute) is incremented.
When the object initiates a data transfer from the database to attributes, a database read counter (DBReadCnt Integer attribute) is incremented.
When the object fails to transfer data from the database, a database read failed counter (DBReadFailedCnt Integer attribute) is incremented.
When the object initiates a database access command, the execution time taken for the command is written to the LastCmdExecutionDuration attribute.
The object monitors the connection time with the SQL Server database, and the connection time is written to the DBConnectionUpTime attribute.
The object provides a command (DiagnosticsResetCmd attribute) to reset all diagnostic status attributes.
Related Topics
Run-Time Behavior
Automatic Database Connection Command
The SQLData object provides automatic connection to the SQL Server database via the DBAutoConnect command attribute.
When the DBAutoConnect attribute is TRUE, the object connects to the database on deployment. If the database connection is lost, the object attempts to automatically reconnect to the database when the next database access command is active.
The object provides a command (DBConnectStateCmd Boolean attribute) that allows for a manual connect and disconnect to the SQL Server database. Manual disconnection from the SQL Server database is not allowed when the DBAutoConnect attribute is set to TRUE.
Related Topics
Run-Time Behavior
Status Table
When the SQLData object attempts to access assigned attributes, and the quality of these attribute is not GOOD, the object writes to the Status table information such as the attribute name, attribute quality, and the foreign key value for the associated record. The information in the status table can be used for future reference.
Related Topics
Run-Time Behavior
Read-Only Database Handling
The SQLData object provides read-only access from the SQL Server database via the DBReadOnly attribute. In read-only mode, the SQLData object requires a valid SQL Server database to connect to, as the object cannot create a new SQL Server database in this mode.
When the DBReadOnly attribute is set to TRUE, the database write command attributes (such as AttrToDBAppendCmd, AttrToDBReplaceCmd, TempToDBAppendCmd, TempToDBReplaceCmd, and RecordDeleteCmd) are disabled.
Related Topics
Run-Time Behavior
Object Attributes
Attributes that are common to all objects are not included in the following attribute table. For information on common attributes, see the Configuration Help. To access this Help file, click the Configuration Help link, which is located in the fixed header area that appears at the top of this Help file window.
Hidden attributes are not included in the following attribute table. Hidden attribute names are prefixed with an underscore ( _ ) and may be visible within certain applications, such as the Object Viewer. Hidden attributes are generally used for internal ArchestrA functionality, and should be ignored.
INSET_Table Legend:
The Config column specifies whether the attribute can be configured using an option in the object editor.
The RT Access column describes how the attribute value can be accessed at run time. Values for this column include:
- Supervisory – The attribute value can be changed using a script.
- User – The attribute value can be modified by the user.
- Read-Only – The attribute value cannot be changed.
- None – The primitive is being deployed; however, the attribute is not deployed at run time (package only)._INSET
|
Attribute
|
Description
|
Config
|
RT Access
|
|
AttrToDBAppendCmd
|
If set to TRUE, a transfer of values will be initiated from the assigned attributes to a new database record in the SQL Server database (append new database record). The SQLData object resets this attribute after it executes. The values from the new database record are transferred to the dynamically created run-time attributes to reflect the record selected.
If an assigned attribute quality is not GOOD, and the AttrToDBQualityIgnore attribute is FALSE, the transfer of values is prevented so that bad data is not written to the database. An error is generated.
When the AttrToDBQualityIgnore attribute is TRUE, all attribute values are written to the database as a new record. Attribute values with quality other than GOOD are written to the databasename_status database with the following information: attribute name, attribute quality, and foreign key value for the associated record.
|
No
|
Supervisory, User
|
|
AttrToDBQualityIgnore
|
If set to TRUE, assigned attributes with a quality other than GOOD will be allowed to be transferred to the database using the AttrToDBAppendCmd and AttrToDBReplaceCmd command attributes.
Assigned attribute values with quality other than GOOD are written to the databasename_status database with the following information: attribute name, attribute quality, and foreign key value for the associated record.
|
|
Read-Only
|
|
AttrToDBReplaceCmd
|
If set to TRUE, a transfer of values will be initiated from the assigned attributes to the selected database record in the SQL Server database. The SQLData object resets this attribute after it executes. The new values from the database record are transferred to the dynamically created run-time attributes to reflect the record selected.
If an assigned attribute quality is not GOOD, and the AttrToDBQualityIgnore attribute is FALSE, the transfer of values is prevented so that bad data is not written to the database. An error is generated.
If the RecordCnt attribute value is not equal to 1, the AttrToDBReplaceCmd attribute functionality is disabled.
When the AttrToDBQualityIgnore attribute is TRUE, the values in selected database record are replaced with the attribute values. Attribute values with quality other than GOOD are written to the databasename_status database with the following information: attribute name, attribute quality, and foreign key value for the associated record.
|
No
|
Supervisory, User
|
|
AttrToTempCmd
|
If set to TRUE, a transfer of values and quality is initiated from the assigned attributes to the dynamically created run-time attributes. This attribute resets itself after execution.
|
No
|
Supervisory, User
|
|
AttrWriteComplete
|
If TRUE, a successful transfer has occurred of values from the database to the assigned attributes within the time period specified by the DBWriteTimeout attribute after initiation of the TempToAttrCmd and DBToAttrCmd command attributes.
The AttrWriteComplete attribute is reset after the AttrWriteCompleteResetCmd command attribute is set or after subsequent setting of the TempToAttrCmd and DBToAttrCmd command attributes.
|
No
|
Read-Only
|
|
AttrWriteCompleteResetCmd
|
If set to TRUE, the AttrWriteComplete attribute will be reset. This command is optional, as the AttrWriteComplete attribute is reset automatically by subsequent TempToAttrCmd and DBToAttrCmd command attributes. This attribute resets itself after execution.
|
No
|
Supervisory, User
|
|
AttrWriteInhibitDelay
|
The time preset, in milliseconds, that maintains the SemaphoreAttrWrite attribute as TRUE once a transfer to the assigned attributes has been initiated. This applies to both the TempToAttrCmd and DBToAttrCmd command attributes.
|
|
Supervisory, User
|
|
AuthenticationMode
|
The authentication method used for connecting to the SQL Server database. Valid values are ArchestrA User, Windows User, or SQL User.
When the authentication method is set to Window User, the _Domain, _UserName, and _UserPassword hidden attributes are used for authentication.
When the authentication method is set to SQL User, the _UserName, and _UserPassword hidden attributes are used for authentication.
When the authentication method is set to ArchestrA User, the ArchestrA network account is used for authentication.
|
|
Read-Only
|
|
DBAutoConnect
|
If set to TRUE, automatic connection to the SQL Server database will be enabled.
When TRUE, the SQLData object establishes a connection to database upon initial deployment and upon demand if the connection is lost.
|
|
Supervisory, User
|
|
DBConnectionUpTime
|
The database connection up time.
|
No
|
Read-Only
|
|
DBConnectState
|
If TRUE, the SQLData object is connected to the SQL Server database. If FALSE, the SQLData object is disconnected.
|
No
|
Read-Only
|
|
DBConnectStateCmd
|
If set to TRUE, the SQLData object performs a manual connect to the SQL Server database. If set to FALSE, the SQLData object performs a manual disconnect from the SQL Server database.
When the DBAutoConnect attribute is TRUE, the DBConnectStateCmd attribute is TRUE, and you cannot set the DBConnectStateCmd attribute to FALSE.
|
No
|
Supervisory, User
|
|
DBName
|
The name of the SQL Server database to which the object is configured to connect.
|
|
Read-Only
|
|
DBReadCnt
|
The total number of database reads performed by the SQLData object. This count can be reset by using the DiagnosticsResetCmd attribute.
|
No
|
Read-Only
|
|
DBReadFailedCnt
|
The total number of failed database reads performed by the SQLData object. This count can be reset by using the DiagnosticsResetCmd attribute.
|
No
|
Read-Only
|
|
DBReadOnly
|
If set to TRUE, read-only access is allowed for the SQL Server database. The SQLData object will not be able to modify either the database schema or the data. No write commands (AttrToDBAppendCmd, AttrToDBReplaceCmd, TempToDBAppendCmd, TempToDBReplaceCmd, and RecordDeleteCmd attributes) can be performed against the SQL Server database. Reading values from the database is permitted.
The DBReadOnly attribute requires a valid database, as the option does not create a new database on initial deployment.
|
|
Read-Only
|
|
DBServerName
|
The name of the SQL Server to which the object is configured to connect. Named server instances are not supported.
|
|
Read-Only
|
|
DBTableName
|
The name of the SQL Server database table to which the object is configured to connect.
|
|
Read-Only
|
|
DBToAttrCmd
|
If set to TRUE, a SQL query is initiated to select a database record and then transfer the values of the selected database record to the assigned attributes. The SQLData object resets this attribute after it executes. The values from the database record are transferred to the dynamically created run-time attributes to reflect the record selected.
The record selection uses the run-time query. The run-time query can be configured to use either the SQL query string attribute or the combination of column name and column value attributes.
If the QueryStringEnable attribute is TRUE, then the query is:
"WHERE QueryString"
If the QueryStringEnable attribute is FALSE, the query is:
"WHERE QueryColumnName = QueryColumnValue"
If more than one record is returned by the query, an error is generated, and the transfer is terminated. An error is generated if any value fails to transfer.
|
No
|
Supervisory, User
|
|
DBToTempCmd
|
If set to TRUE, a SQL query is initiated to select a database record and then transfer the values of the selected database record to the dynamically created run-time attributes. The SQLData object resets this attribute after it executes.
The record selection uses the run-time query. The run-time query can be configured to use either the SQL query string attribute or the combination of column name and column value attributes.
If the QueryStringEnable attribute is TRUE, then the query is:
"WHERE QueryString"
If the QueryStringEnable attribute is FALSE, the query is:
"WHERE QueryColumnName = QueryColumnValue"
If more than one record is returned by the query, an error is generated, and the transfer is terminated.
|
No
|
Supervisory, User
|
|
DBWriteCnt
|
The total number of database writes performed by the SQLData object. This count is reset by the DiagnosticsResetCmd attribute.
|
No
|
Read-Only
|
|
DBWriteFailedCnt
|
The total number of failed database writes performed by the SQLData object. This count is reset by the DiagnosticsResetCmd attribute.
|
No
|
Read-Only
|
|
DBWriteTimeout
|
The error time out period, in milliseconds. The ErrorDBWrite attribute is set to TRUE when the time out delay period expires.
|
|
Supervisory, User
|
|
DiagnosticsResetCmd
|
If set to TRUE, the DBWriteCnt, DBWriteFailedCnt, DBReadCnt, DBReadFailedCnt, LastCmdExecutionDuration, and DBConnectionUpTime attributes are set to zero. The DiagnosticsResetCmd attribute resets itself after execution.
|
No
|
Supervisory, User
|
|
ErrorCode
|
A representation of the active error as an integer number.
|
No
|
Read-Only
|
|
ErrorDBRead
|
If set to TRUE, an error has occurred during data transfer from the database to the dynamically created run-time attributes or the assigned attributes. The following events represent a transfer error:
1. The query returns no record.
2. The record cannot be read due to security access restrictions.
3. The record cannot be read due to a database failure.
4. The values have failed to transfer to the assigned attributes within the period specified by the DBWriteTimeout attribute.
|
No
|
Read-Only
|
|
ErrorDBWrite
|
If set to TRUE, an error has occurred during the modification of a record in the database. The following events represent a edit error:
1. The record cannot be modified due to security access restrictions.
2. The record cannot be modified due to a database failure.
3. The record has been deleted by another application after the record has been selected.
|
No
|
Read-Only
|
|
ErrorDeletingDBRecord
|
If set to TRUE, an error has occurred during deletion of a record(s) from the database. The following events represent a transfer error:
1. The record cannot be read due to security access restrictions.
2. The record cannot be read due to a database failure.
|
No
|
Read-Only
|
|
ErrorDesc
|
A representation of the active error as a string. The string describes the last error obtained in the SQLData object. For example, if a database read error occurred, a database read error message is displayed.
|
No
|
Read-Only
|
|
ErrorSelectNextRecord
|
If set to TRUE, an error has occurred during an attempt to move to a record that does not exist using the RecordSelectNextCmd command attribute. (That is, attempting to scroll past the last record in the database.)
|
No
|
Read-Only
|
|
ErrorSelectPreviousRecord
|
If set to TRUE, an error has occurred during an attempt to move to a record that does not exist using the RecordSelectPreviousCmd command attribute. (That is, attempting to scroll before the first record in the database.)
|
No
|
Read-Only
|
|
ErrorsResetAllCmd
|
If set to TRUE, the following attributes will be reset: ErrorCode, ErrorDeletingDBRecord, ErrorDBRead, ErrorDBWrite, ErrorSelectNextRecord, ErrorSelectPreviousRecord, and ErrorDesc.
When the ErrorsResetAllCmd attribute is TRUE, the following values are set:
- ErrorCode = 0
- ErrorDeletingDBRecord = false
- ErrorDBRead = false
- ErrorDBWrite = false
- ErrorSelectNextRecord = false
- ErrorSelectPreviousRecord = false
- ErrorDesc = ""
|
No
|
Supervisory, User
|
|
LastCmdExecutionDuration
|
The time, in milliseconds, taken to execute a database access command (such as the AttrToDBAppendCmd, AttrToDBReplaceCmd, DBToAttrCmd, DBToTempCmd, RecordDeleteCmd, RecordSelectNextCmd, RecordSelectPreviousCmd, TempToDBAppendCmd, and TempToDBReplaceCmd attributes).
|
No
|
Read-Only
|
|
QueryColumnName
|
The column name used by the run-time query. If the QueryStringEnable attribute is FALSE, the query is:
"WHERE QueryColumnName = QueryColumnValue"
The query is used by the DBToTempCmd, RecordDeleteCmd, and DBToAttrCmd command attributes.
|
|
Supervisory, User
|
|
QueryColumnValue
|
The default column value used by the run-time query. If the QueryStringEnable attribute is FALSE, the query is:
"WHERE QueryColumnName = QueryColumnValue"
The query is used by the DBToTempCmd, RecordDeleteCmd, and DBToAttrCmd command attributes.
|
|
Supervisory, User
|
|
QueryString
|
The run-time SQL query. This query will execute at run time if the QueryStringEnable attribute has been set to TRUE. The query is executed by the RecordDeleteCmd, DBToTempCmd, and DBToAttrCmd command attributes.
The SQL method when using this string is:
"WHERE QueryString"
Incorrect queries will return an error on execution. No error checking of the string provided.
|
No
|
Supervisory, User
|
|
QueryStringEnable
|
Used to determine the method for creating the query executed by the RecordDeleteCmd, DBToTempCmd, and DBToAttrCmd command attributes.
If the QueryStringEnable attribute is TRUE, the query is:
"WHERE QueryString"
If the QueryStringEnable attribute is FALSE, the query is:
"WHERE QueryColumnName = QueryColumnValue"
|
|
Read-Only
|
|
RecordCnt
|
The total number of records in the active query at run time.
|
No
|
Read-Only
|
|
RecordDeleteCmd
|
If set to TRUE, a SQL query will be initiated to select a database record(s) and then deletes the selected record(s). The SQLData object resets this attribute after it executes. The values in the dynamically created run-time attributes are cleared to reflect that no record is selected in the database.
The record selection uses the run-time query. The run-time query can be configured to use either the SQL query string attribute or the combination of column name and column value attributes.
If the QueryStringEnable attribute is TRUE, then the query is:
"WHERE QueryString"
If the QueryStringEnable attribute is FALSE, the query is:
"WHERE QueryColumnName = QueryColumnValue"
|
No
|
Supervisory, User
|
|
RecordFirstSelected
|
Set to TRUE when the first record in the database has been selected.
|
No
|
Read-Only
|
|
RecordLastSelected
|
Set to TRUE when the last record in the database has been selected.
|
No
|
Read-Only
|
|
RecordSelectNextCmd
|
If set to TRUE, the next record in the database will be selected, the values of the selected database record will be transferred to the dynamically created run-time attributes (no reference is made to the query or dynaset created by the query). This attribute resets itself after execution.
An error is generated when an attempt is made to go past the last record in the database. If no record has been selected, then the first record in the database is selected.
|
No
|
Supervisory, User
|
|
RecordSelectPreviousCmd
|
If set to TRUE, the next record in the database will be selected, and the values of the selected database record will be transferred to the dynamically created run-time attributes (no reference is made to the query or dynaset created by the query). This attribute resets itself after execution.
An error is generated when an attempt is made to go past the first record in the database. If no record has been selected, then the first record in the database is selected.
|
No
|
Supervisory, User
|
|
RecordSingleSelected
|
Set to TRUE when the query returns a single record.
|
No
|
Read-Only
|
|
SemaphoreAttrWrite
|
Set to TRUE for a time period (specified by the AttrWriteInhibitDelay attribute) after a transfer to the assigned attributes has been initiated to prevent simultaneous writes to the assigned attributes.
|
No
|
Read-Only
|
|
SemaphoreDBWrite
|
If set to TRUE, the object will be prevented from performing simultaneous edits of the database records.
|
No
|
Read-Only
|
|
TempAttrQualityResetCmd
|
If set to TRUE, the quality status of all temporary attributes will be set to GOOD. This attribute resets itself after execution.
|
No
|
Supervisory, User
|
|
TempToAttrCmd
|
If set to TRUE, the values of the dynamically created run-time attributes will be transferred to the assigned attributes. The SQLData object resets this attribute after it executes.
If a temporary attribute quality is not GOOD, and the TempToAttrQualityIgnore attribute is FALSE, the transfer of values is prevented so that bad data is not written to the assigned attributes. The temporary attribute quality can be manually set to GOOD by setting the TempAttrQualityResetCmd command attribute to TRUE.
|
No
|
Supervisory, User
|
|
TempToAttrQualityIgnore
|
If set to TRUE, temporary attributes with a quality other than GOOD will be allowed to be transferred to the assigned attributes using the TempToAttrCmd command attribute.
|
|
Read-Only
|
|
TempToDBAppendCmd
|
If set to TRUE, the values from the dynamic attributes will be transferred to a new database record (append new database record). The SQLData object resets this attribute after it executes.
If a temporary attribute quality is not GOOD (that is, BAD or UNCERTAIN), and the TempToDBQualityIgnore attribute is FALSE, the transfer of values is prevented so that bad data is not written to the database. The temporary attribute quality can be manually set to GOOD by setting the TempAttrQualityResetCmd command attribute to TRUE.
|
No
|
Supervisory, User
|
|
TempToDBQualityIgnore
|
If set to TRUE, temporary attributes with a quality other than GOOD will be allowed to be transferred to the database using the TempToDBAppendCmd and TempToDBReplaceCmd command attributes.
|
|
Read-Only
|
|
TempToDBReplaceCmd
|
If set to TRUE, the values of the dynamically created run-time attributes will be transferred to the selected database record. The SQLData object resets this attribute after it executes.
If a temporary attribute quality is not GOOD (that is, BAD or UNCERTAIN), and the TempToDBQualityIgnore attribute is FALSE, the transfer of values is prevented so that bad data is not written to the database. The temporary attribute quality can be manually set to GOOD by setting the TempAttrQualityResetCmd command attribute to TRUE.
If the RecordCnt attribute value is not equal to 1, the TempToDBReplaceCmd attribute is not available.
|
No
|
Supervisory, User
|
Related Topics
Overview
Configuration
Run-Time Behavior
Error Messages and Codes
Error Messages and Codes
When an error occurs, the SQLData object generates error messages with their respective message codes. These error messages are sent to the Log Viewer.
The following table contains error messages and codes.
|
Error Code
|
Error Message
|
Cause
|
|
0
|
(none)
|
Success.
|
|
-75
|
Error: Cannot connect to database.
|
An error occurred during communication with or connection to the SQL Server database.
|
|
-100
|
Error: Invalid XML string.
|
An error occurred because of an invalid XML format in the _TableDef attribute.
|
|
-200
|
Error: No record found.
|
An error occurred during the attempt to find a requested record in the SQL Server database.
|
|
-201
|
Error: Updating an existing Record.
|
An error occurred during an update of an existing record in the SQL Server database table.
|
|
-202
|
Error: Adding a new Record.
|
An error occurred during the addition a new record to the SQL Server database table.
|
|
-203
|
Error: Unknown error while Deleting
|
An error occurred during the deletion of an existing record. Or, the object was unable to delete a record that does not exist in the SQL Server database table.
|
|
-204
|
Error: No record selected
|
A record was unable to be selected when one of the following command attributes were executed: DBToAttrCmd, DBToTempCmd, AttrToDBReplaceCmd, AttrToDBAppendCmd, TempToDBReplaceCmd, TempToDBAppendCmd, RecordSelectNextCmd, or RecordSelectPreviousCmd.
|
|
-205
|
Error: No more records
|
An attempt was made to scroll to a record that does not exist (that is, scrolling above the first record or scrolling past below the last record in the database table).
|
|
-206
|
Error: Cannot create Database.
|
An error occurred during the creation of the SQL Server database.
|
|
-207
|
Error: Trying to Modify Database.
|
An error occurred during a modification of the SQL Server database.
|
|
-210
|
Error: Failed deleting database record(s). No Record(s) found matching the current query.
|
An error occurred when an attempt was made to find a matching record in the SQL Server database table using the run-time query.
|
|
-211
|
Error: Failed to select next record. Last Record already selected
|
An attempt was made to scroll beyond the last record in the SQL Server database table.
|
|
-212
|
Error: Failed to select previous record. First Record already selected.
|
An attempt was made to scroll before the first record in the SQL Server database table.
|
|
-213
|
Error: Failed to select record. Table contains no records.
|
An error occurred during the selection of a record from an empty SQL Server database table.
|
|
-214
|
Error: Failed to select next record. Unknown Error
|
An error occurred during a scroll to the next record in the SQL Server database table.
|
|
-215
|
Error: Failed to select previous record. Unknown Error
|
An error occurred during a scroll to the previous record in the SQL Server database table.
|
|
-240
|
Error: Failed writing to Assigned Attribute(s).
|
An error occurred when a value was written to the attribute.
|
|
-241
|
Error: Delay connecting to database.
|
The database access command has been processing longer than the write timer (specified by the DBWriteTimeout attribute), and error has not been received.
|
|
-242
|
Error: Last command still processing. Please wait...
|
An attempt was made to perform a database access command before the previous database access command had completed.
|
|
-250
|
Error: SQL Query string cannot be empty.
Or
Error: Both 'QueryName' and 'QueryValue' must have a value
|
The QueryString attribute was used to access the database, and the query string was empty.
The QueryColumnName and QueryColumnValue attributes were used to access the database, and the column name or a column value was empty.
|
|
-300
|
Error: More than one record selected
|
Error resulting in more than one record returned from a query.
|
|
-310
|
Error: Failed to add record. Record already exists.
|
An attempt was made to add a duplicated record in the SQL database table.
|
|
-350
|
Error: Invalid Conversion of attribute type.
|
An error occurred during the conversion of the type of attribute.
|
|
-351
|
Error: Failed writing attribute value(s) to the Database table. Assigned Attribute(s) Quality is not Good.
|
An error occurred during the transfer of values to the assigned attribute when attribute quality was not GOOD.
|
|
-352
|
Error: Failed writing attribute value(s) to the Database. Temporary Attribute(s) Quality is not Good.
|
An error occurred during the addition of a record to the database when the assigned attribute quality was not GOOD.
|
|
-500
|
Error: Semaphore still active.
|
An attempt was made by multiple users to access to the SQL Server database or to the assigned attribute.
|
|
-550
|
Error: Database not connected. Manual connection required.
|
An attempt was made to access the database using database access commands when the object was not connected to the database and the DBAutoConnect attribute was not TRUE.
|
|
-551
|
Error: Already Connected.
|
An attempt was made to connect to a database using the DBConnectStateCmd command attribute when the object was connected to the database.
|
|
-552
|
Error: Not Connected.
|
An attempt was made to disconnect from a database using the DBConnectStateCmd command attribute when the object was not connected to the database.
|
|
-560
|
Error: AutoConnect must be off, before using DBConnectStateCmd
|
An attempt was made to perform a manual disconnection from the database when the AutoConnect attribute was enabled.
|
|
-561
|
Error: Database opened in Read-only mode
|
An attempt was made to write to a read-only SQL Server database.
|
Related Topics
Overview
Configuration
Run-Time Behavior
Object Attributes
© 2014 Invensys Systems, Inc. All Rights Reserved.
Invensys is a Schneider Electric company
10/20/14