Create New Table
To create a table, select Create New Table... from the Database menu or Table Explorer Context Menu, or click the Create New Table button in the Table Explorer toolbar. The Create New Table dialog is activated, prompting you to enter the following information:
Managed SQL
This tab is for creating SQL tables via Managed Connections. If you use drivers that support Managed Connections, we recommend doing so. The Studio and other DataFlex tools maintain Managed Connections and INT files for you, eliminating a lot of manual maintenance.
Connection Id
Choose the Connection Id to connect to. If you have multiple Managed Connections using the same Connection Id, the enabled version will be used.
Manage Connections
This button opens the SQL Connection Manager, which lets you configure Managed Connections for a workspace using Connection IDs.
Connection String
This shows you the Connection String configured for your Managed Connection, allowing you to verify it before proceeding.
Table Name
Enter the name of your new table. This name should conform to your database's table name rules and should be unique for the current database.
Schema
Enter the database schema name.
Table Number
DataFlex’s file list uses a table number to address each table. Each data table in your application must have a unique table number within the supported range (1-4095, except for reserved numbers 48-50 and 251-300).
You are prompted with the lowest unused table number. You can accept the default or choose a different number. The table number determines the locking order for any group of tables that need to be locked, ensuring that tables are always locked in the same order.
Clicking the search icon on the right will increment the table number to the next highest unused table number.
Root Name
If you are using the embedded database, the Root Name refers to the directory name of the new table (excluding the file extension). Normally, the table name and this root name will be the same. The Root Name must conform to operating-system filename rules.
Enter the Root Name of the table you are creating. In certain cases, you may wish to enter a drive letter and path (up to a maximum of 40 characters in total). If you do not enter a drive and path, the workspace Data path will be used to specify the table's location. Normally, you will not specify a drive letter or path.
If you are not using the embedded database, then the filename refers to the name of the file that records a description of the table to the database driver. Special modifiers can be added to the filename to specify the type of driver. Normally, you will not edit this field, as it is better to accept the defaults that are entered for you in this dialog. Refer to your database driver documentation for specific information.
Recnum Table
Check this if you wish to make this a Recnum table. Recnum tables are a legacy attribute of the embedded database and are not needed for SQL tables, especially brand new ones that were not converted from the embedded database.
Embedded
This tab is for creating embedded database tables.
Table Number
DataFlex’s file list uses a table number to address each table. Each data table in your application must have a unique table number within the supported range (1-4095, except for reserved numbers 48-50 and 251-300).
You are prompted with the lowest unused table number. You can accept the default or choose a different number. The table number determines the locking order for any group of tables that need to be locked, ensuring that tables are always locked in the same order.
Clicking the search icon on the right will increment the table number to the next highest unused table number.
Root Name
If you are using the embedded database, the Root Name refers to the directory name of the new table (excluding the file extension). Normally, the table name and this root name will be the same. The Root Name must conform to operating-system filename rules.
Enter the Root Name of the table you are creating. In certain cases, you may wish to enter a drive letter and path (up to a maximum of 40 characters in total). If you do not enter a drive and path, the workspace Data path will be used to specify the table's location. Normally, you will not specify a drive letter or path.
If you are not using the embedded database, then the filename refers to the name of the file that records a description of the table to the database driver. Special modifiers can be added to the filename to specify the type of driver. Normally, you will not edit this field, as it is better to accept the defaults that are entered for you in this dialog. Refer to your database driver documentation for specific information.
Other SQL
This tab is for creating SQL tables via non-Managed Connections. If you use drivers that support Managed Connections, we recommend doing so. The Studio and other DataFlex tools maintain Managed Connections and INT files for you, eliminating a lot of manual maintenance.
Database Type
Choose the database type to connect to. Drivers already loaded in the Studio will display in the combo list. Selecting Load Driver... will open the Configure Database Drivers dialog to allow you to load other drivers.
Manage Connections
This button opens the SQL Connection Manager, which lets you configure Managed Connections for a workspace using Connection IDs.
Edit Connection
This activates a connection dialog to help you configure the connection string to your particular database. This is the recommended method of editing your connection string. The dialog will be one of the following:
- DB2 Connection Properties
- MSSQL Connection Properties
- ODBC Connection Properties
- Pervasive.SQL Connection Properties
Connection String
This shows you the Connection String configured for your Connection, allowing you to verify it before proceeding.
The Connection String is a set of property=value pairs used to establish a connection to your desired database. The particular set of property=value pairs is determined by the specific database that you are connecting to. Refer to your database driver documentation for specific details.
Table Name
Enter the name of your new table. This name should conform to your database's table name rules and should be unique for the current database.
Schema
Enter the database schema name.
Table Number
DataFlex’s file list uses a table number to address each table. Each data table in your application must have a unique table number within the supported range (1-4095, except for reserved numbers 48-50 and 251-300).
You are prompted with the lowest unused table number. You can accept the default or choose a different number. The table number determines the locking order for any group of tables that need to be locked, ensuring that tables are always locked in the same order.
Clicking the search icon on the right will increment the table number to the next highest unused table number.
Root Name
If you are using the embedded database, the Root Name refers to the directory name of the new table (excluding the file extension). Normally, the table name and this root name will be the same. The Root Name must conform to operating-system filename rules.
Enter the Root Name of the table you are creating. In certain cases, you may wish to enter a drive letter and path (up to a maximum of 40 characters in total). If you do not enter a drive and path, the workspace Data path will be used to specify the table's location. Normally, you will not specify a drive letter or path.
If you are not using the embedded database, then the filename refers to the name of the file that records a description of the table to the database driver. Special modifiers can be added to the filename to specify the type of driver. Normally, you will not edit this field, as it is better to accept the defaults that are entered for you in this dialog. Refer to your database driver documentation for specific information.
Recnum Table
Check this if you wish to make this a Recnum table. Recnum tables are a legacy attribute of the embedded database and are not needed for SQL tables, especially brand new ones that were not converted from the embedded database.
OK
Click the OK button to proceed. The Studio will create a new table and activate the Table Editing dialog to allow you to set up columns, relationships, and indexes.
When the new table is saved, the Studio will create a data dictionary class for the table. For a description of the naming conventions used to create the data dictionary class, see Configure Studio.
Cancel
Click the Cancel button to close this dialog without creating a new table.
Help
Click the Help button to display this help topic for creating a new table.