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:
Cancel

Migrating to MySQL Environment

Lesson 6: Setting up MySQL to work with DataFlex

The DataFlex 19.1 Studio is needed to setup MySQL to work with DataFlex. Download DataFlex 19.1 Studio here.

Demonstration – Setting up the workspace to use MySQL

  1. To setup a MySQL version of the workspace…
  2. From This PC > Local Disk (C:) > DataFlex 19.1 Examples right click on the ‘Order Entry’ folder, and select ‘Copy’
  3. Right click within the same directory and select ‘Paste’
  4. Select ‘Order Entry – Copy’ to rename it to ‘Order Entry MySQL Database’
  5. Double click the renamed folder
  6. Select ‘Order Entry.sws’ file to rename it to ‘Order Entry MySQL Database.sws’
  7. Launch the DataFlex Studio
  8. Select ‘Open Workspace’ from the ‘Workspaces’ menu on the left
  9. Select ‘Order Entry MySQL Database’
  10. Select ‘Order Entry MySQL Database.sws,’ and click ‘Open.’
  11. Both in the Table Explorer and the Properties panel the connections are shown as DataFlex
  12. To configure the connection…
  13. Click on the first item in the Database section of the dashboard, ‘> Manage Server/Database Connections’
  14. Click on ‘Add’
  15. Select ‘ODBC_DRV’ from the ‘Database Type’ pulldown menu
  16. Enter and ID name into ‘Connection ID,’ “OrderDBMySQL”
  17. Click ‘ODBC Administrator’ to view that the DSN is listed, ‘OrderEntryDB’
  18. Check the box for ‘Show system data sources’
  19. Select ‘OrderEntryDB,MySAL ODBC 8.0 ANSI Driver’ from the ‘Select or enter and ODBC Data Source’ pull down menu
  20. Click ‘Test Connection’ to confirm the setup and click ‘Ok’
  21. The connection is ready. Click ‘Save.’ The workspace is now configured.
  22. To convert the DataFlex table files that are still in the workspace to MySQL…
  23. Select ‘Database’ from the top menu and click on ‘SQL Conversion Wizard’
  24. Click ‘Next’ three times in the wizard to keep the defaults for those screens
  25. All of the tables shown for the workspace need to be converted, so click ‘Select All’ and then ‘Next’ to start the conversion
  26. Keep the default to ‘Detect and Assign primary keys (recommended)’ and click ‘Next’
  27. Schema does not apply for converting to MySQL, so the ‘Schema’ field is to be left blank, click ‘Next’ three times and then ‘Finish’ after the Wizard has completed
  28. From the MySQL Workbench, right click on ‘orderentry191,’ and select ‘Refresh All’ to do a refresh to show that all the tables are now stored in MySQL
  29. From the DataFlex Studio, select ‘Tools’ from the top menu and then ‘Database Explorer’
  30. Select a table from the left and click on the ‘Attributes’ tab to also confirm the MySQL conversion took place and to see additional .int information
  31. Select the ‘Create a grid’ icon from the top toolbar, select a table from the left and view the information in the Data tab. There is no difference between the current data and when it was the native DataFlex.
  32. Select the ‘Run’ icon from the top toolbar to view Order Entry now running on MySQL. Performance is unchanged.
  33. Create a new order by filling out the various fields.
  34. From the MySQL Workbench, and from the ‘Navigator’ panel expand ‘orderentry191 > Tables > orderheader’
  35. Right click on ‘orderheader,’ and select ‘Select Rows – Limit 1000’ to display the table
  36. Add and run a query to select the order that was just created – SELECT * FROM orderentry191.orderhearder where order_number > 2220;


Conclusion

This course covered:

  1. What is MySQL?
  2. Why migrate to MySQL?
  3. MySQL Environment
  4. Setting up the MySQL Environment
  5. DataFlex Environment
  6. Setting up MySQL to work with DataFlex

This should give you the base to start using MySQL with your DataFlex applications. Now you can put into practice what you’ve learned here and build your test environment to get a MySQL version of your applications ready.