To continue with this content, please log in with your Data Access ID or create a new account.
Cancel Data Access ID
You may not be authorized to see this content. Please contact Data Access Europe for more information.
Cancel Data Access Europe
You are not authorized to see this content.
Cancel Data Access Europe
Next lesson:
Creating your first table
Cancel

Working with databases

Lesson 2: Creating the database

To get started, a workspace needs to be setup, and a create a database.

  1. From the DataFlex studio select ‘New Workspace’ from the panel on the left.

  2. Select ‘Next,’ and enter “Cookbook” as the ‘Name of the New Workspace’ on the following screen. Select ‘Next.’
  3. The next screen is to setup the database connection. Select ‘Set Managed Database Connection.’
  4. Choose the ‘Database Type’ from the first dropdown. ‘MSSQLDRV’ will be used in this lesson.
  5. Enter “cookbook” in the ‘Connection Id’ field. 
  6. Enter the address of the server in the ‘Select or enter a Server Name’ field. “(local)” is entered in the example because the server is on the same machine.
  7. The ‘Use Windows Authentication’ checkbox is marked, so that usernames and passwords to not need to be used at this time. In a deployment situation a username and password would be entered.
  8. Selecting ‘Test Connection’ should return a ‘Login to server successful!’ message.
  9. If an existing database does not exist, select ‘Create Database,’ and enter the desired name into the new window, and select ‘OK.’ “Cookbook” is entered for this lesson.
  10. Select ‘OK.’ The screen now shows the ‘Connection ID’ and the ‘Connection String,’ which is what the driver uses to connect to the database. Select ‘Next.” Select ‘Finish.”
  11. The new workspace has now been created.
  12. Clicking on the ‘Workspace Summary’ shows the workspace folder that now contains all of the various folders for the workspace.
  13. Opening the ‘Data’ folder shows the file list, ‘Filelist.cfg,’ that contains the list of the tables. It also contains the connection file, ‘DFConnId.ini,’ which contains the connection information.

  14. In the Studio, select DATABASE > SQL CONNECTION MANAGER from the top menu to view the existing connections.
  15. Only one is currently shown. Others can be added from the manager.
  16. When making changes to a connection, all of the tables that are part of the connection change.