Create Table
ActionStep Reference » Windows » Database » Create Table
The ActionStep Create Table adds a new table to an existing database and sets column fields to hold data records.
- Open the Windows node in the Workspace Explorer.
- Open the Database node, and select the Create Table ActionStep.
Parameters:
The ActionStep has the following input parameters:
name |
Description
|
---|---|
Connection String
|
The string used to authenticate and connect to the database.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Type [Variable, Parameter, Enum] |
Table
|
The name of the table to be created.
Allowed Context Scope [Fixed, Local, Global] Allowed Context Type [Variable, Parameter, Enum] |
Fields
|
The fields of the table that are to be created.
Parameters of the Field sub-branch:
Allowed Context Type [Variable, Parameter, Enum] |
The "Provider" and "Data Source" must be included in the string to ensure an established connection. |
Results:
The ActionStep returns the following results:
name
|
description
|
---|---|
Result
|
The returned boolean value as a result of creating the table.
Accepted Value: True or False Allowed Context Scope [Fixed, Variable, Global]Allowed Context Type [Variable, Parameter] |
Example 1 (Count the fields of a created database table):
This example creates a connection with a Microsoft Access database named 'customerdb.accdb'. When the connection is established, a database table named 'loans' is then created having five (5) fields and set 'id' field as primary key and applies an auto-increment. The number of fields in the table is then iterated and the last count was incremented to display the correct number of fields. A notice that the table is created is then displayed via Message Box.
See other Database operations:
Create Connection
Select Table
Insert Table
Update Table
Delete Table