SQL configuration Design tab
- Last UpdatedJul 19, 2024
- 3 minute read
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.
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.
Data Type
The SQL 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 SQL 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.
Runtime Access
Set the access allowed for the column at runtime. Select one of three choices from the drop down: No Access, Runtime Only, or Read/Write.
Values 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 DataSheet tab
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 runtime.
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.
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 attribute)
Select this check box to create the SQL Server query. For more information, see SQLData object runtime query string.
Query Column (QueryColumnName attribute)
The column name used by the runtime 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-clustered index on this column. If you manually create such an index, it can improve retrieval performance.
Query Value (QueryColumnValue attribute)
The default value used by the runtime 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 SQLData object identity columns.
Table Definition
A list view of the table definition.