Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sqlways:users-guide:migrate-progress4gl-to-c-net [January 25, 2019, 11:50:33 AM] darya.prikhodkinasqlways:users-guide:migrate-progress4gl-to-c-net [May 31, 2023, 05:28:12 PM] (current) – external edit 127.0.0.1
Line 1: Line 1:
 \\ \\
-[[http://www.ispirer.com|Ispirer Home Page]] +[[https://www.ispirer.com|Ispirer Website]] 
-[[http://www.ispirer.com|Ispirer SQLWays Migration Product Page]] +[[https://www.ispirer.com/products/migration-toolkit|Ispirer Toolkit Overview]] 
-[[http://www.ispirer.com/?click=RequestSQLWays&from=IspirerWIKI|Request SQLWays]]+[[https://www.ispirer.com/download/download-demo|Free Trial]]
 \\ \\
  
-====== How To Migrate Progress 4GL to .NET Using Command Line ======+====== How To Migrate Progress 4GL to C# with Microsoft SQL Server Database Usage ======
  
-To migrate Progress 4GL code to .NET technology in command line mode you can use SQLWays.exe command line tool. This tool is a part of Ispirer Migration and Modernization ToolKit and is a main core tool that performs conversion between databases and applications.+To migrate Progress 4GL code to C# with Microsoft SQL Server usage in command line mode you can use Ispirer nGLFly tool or SQLWays.exe command line tool.
  
 ===== Registration ===== ===== Registration =====
  
-If you run the SQLWays.exe tool for the first time, you need to register the tool using the license information that you have. You can register the toolkit using the SQLWays Wizard tool. Here you can find step by step guide on how to run and register the tool. Please follow the steps described in the article:+If you run the Ispirer nGLFly or SQLWays.exe tool for the first time, you need to register the tool using the license information that you have. You can register the toolkit using the SQLWays Wizard tool. Here you can find step by step guide on how to run and register the tool. Please follow the steps described in the article:
  
 [[http://wiki.ispirer.com/sqlways/faq/how-to-use-sqlways-wizard#welcome_page|How to Run And Register The Toolkit]] [[http://wiki.ispirer.com/sqlways/faq/how-to-use-sqlways-wizard#welcome_page|How to Run And Register The Toolkit]]
  
 +===== Preparation =====
  
-===== Conversion =====+If you have Progress database, first of all you should convert this database to MS SQL Server one. 
 +Before you start Progress 4GL to C# conversion, you should create edmx model to get correct queries in C# results. For this purpose, you can use database file *.mdf or existing connection to database. 
 + 
 +To create EDMX file you should: 
 +  - Open project in Visual Studio 
 +  - Perform right click on project item, select "Add" => "New Item"
 +{{:sqlways:users-guide:cs_edmx_1.png?nolink&1000|}} 
 +  - Select "Data" and choose "ADO.NET Entity Data Model" 
 +  {{:sqlways:users-guide:cs_edmx_2.png}} 
 +  - Select "EF Designer from database" 
 +  {{:sqlways:users-guide:cs_edmx_3.png}} 
 +  - Select existing connection or create a new one using existing database or your *.mdf database file 
 +  {{:sqlways:users-guide:cs_edmx_4.png}} 
 +  - Select "Entity Framework 6.x 
 +  {{:sqlways:users-guide:cs_edmx_5.png}} 
 +  - Select all table, write Model Namespace and set other options as they are set on the picture below and press "Finish" button 
 +  {{:sqlways:users-guide:cs_edmx_6.png}} 
 + 
 +After that you should go to the application folder in File Explorer, find *.edmx file and copy it to the folder with conversion sources. After that you should create a "db" folder, rename edmx file to DataClasses.edmx and put this file into "db" folder. 
 + 
 +{{:sqlways:users-guide:cs_edmx_7.png?nolink&1000|}} 
 + 
 +===== Conversion With Ispirer nGLFly Wizard ===== 
 + 
 +To use EDMX during conversion you should click "Advanced" button on "Target Options" page and set these options:  
 +- "DATA model used" to EDM 
 +- "ENTITY model name" to name that you use during saving connection settings to App.config. (f.e. DemoEntities) 
 +- "ENTITY model namespace" to value of Schema Namespace in edmx file in ConceptualModels section. (f.e. demoModel) 
 + 
 +Other target options should be set as they are set in the screenshot below. 
 + 
 +{{:sqlways:users-guide:cs_edmx_8.png?nolink&1000|}} 
 + 
 +After you will get the results, you can add them to the project where you've been created edmx file and, if you do everything correct, you will have results that are connected to edmx model and database. 
 + 
 +===== Conversion With Command Line =====
  
 After you registered the toolkit you need to run the following command in the Command Prompt: After you registered the toolkit you need to run the following command in the Command Prompt:
  
-   c:\Program Files\Ispirer\MnMTK2015\SQLWays.exe" /D=FIXED /SOURCE= Progress 4GL /TARGET=CS /F=c:\example\*.* /DIR=ResultCS\ /INI=sqlways.ini /TBLDDL=Tables_ddl.sql+   c:\Program Files\Ispirer\MnMTK10\SQLWays.exe" /D=FIXED /SOURCE= Progress 4GL /TARGET=CS /F=c:\example\*.* /DIR=ResultCS\ /INI=sqlways.ini 
  
 \\ \\
 \\ \\
-Description of command line options: +Description of the command line options: 
-   * **c:\Program Files\Ispirer\MnMTK2015\SQLWays.exe**  - a path to the SQLWays.exe command line tool that will run the conversion.+   * **c:\Program Files\Ispirer\MnMTK10\SQLWays.exe**  - a path to the SQLWays.exe command line tool that will run the conversion.
    * **/F** – a path to the source files that should be converted.    * **/F** – a path to the source files that should be converted.
    * **/DIR** - a path to the folder where the conversion results will be saved.    * **/DIR** - a path to the folder where the conversion results will be saved.
Line 31: Line 67:
    * **/SOURCE** - option that defines a source technology (database or application).    * **/SOURCE** - option that defines a source technology (database or application).
    * **/TARGET** - option that defines a target technology (database or application).    * **/TARGET** - option that defines a target technology (database or application).
-   * **/TBLDDL** - a path to the Tables_DDL.sql file. This is the file with the MSSQL table definitions. This file is used by the SQLWays.exe tool in order to apply correct conversion of columns, data types and JOINS.  
  
 \\ \\
Line 38: Line 73:
 To convert your Progress 4GL source code, please specify the following options in the sqlways.ini file: To convert your Progress 4GL source code, please specify the following options in the sqlways.ini file:
 \\ \\
-   [Common]+ 
 +   [COMMON]
    DSN=c:\Root\    DSN=c:\Root\
-   REGISTRATION_NAME=RegName +   SOURCE=Progress 4GL 
-   TARGET_DB=MSSQLServer +   TARGET=CS 
-   +   TARGET_DB=Microsoft SQL Server
    [CS]    [CS]
-   ENTITY_MODEL_NAME=your_EntityModelName +   ENTITY_MODEL_NAME=DemoEntities 
-   ENTITY_MODEL_NAMESPACE=your_EntityModelNameSpace+   ENTITY_MODEL_NAMESPACE=demoModel
    DATA_MODEL=EDM    DATA_MODEL=EDM
-   UI_TYPE=WinForms 
-   GENERATE_CSPRJ=Yes 
-   COMPILED_QUERIES=Yes 
-   CONVERT_DEPEND_LIBS=no 
-   TEMP_TABLES_PREFIX=false 
-   GENERATE_TRANSACTIONSCOPE=yes 
-   PROJECT_NAMESPACE=your_namespace 
-   SAVE_4GL_QUERIES=yes 
-   GENERATE_SYSTEM_PARAMETERS=YES  
- 
-   [PROGRESS4GL]  
-   PARSER_PR_4GL=UNIX 
- 
  
  
Line 65: Line 88:
    * **REGISTRATION_NAME=** - is mandatory for your company.    * **REGISTRATION_NAME=** - is mandatory for your company.
    * **TARGET_DB=** - specifies the target database.    * **TARGET_DB=** - specifies the target database.
-   * **DATA_MODEL=** - specifies the data model. +   * **ENTITY_MODEL_NAME=** - specifies the entities name that will be used in code
-     * **ENTITY_MODEL_NAME=** - specifies the name of your sql schema. +   * **ENTITY_MODEL_NAMESPACE=** - specifies the entities namespace that is set in edmx files in Schema Namespace inside ConceptualModules Section
-     * **ENTITY_MODEL_NAMESPACE=** - is used to identify the name of database model. +   * **DATA_MODEL=EDM** - specifies the usage of entities framework for conversion.
-   * **UI_TYPE=** - specifies Windows Forms technology for migration if there is any UI logic. +
-   * **GENERATE_CSPRJ=** - creates VS project file (but in that case Entity Model should be added manually)+
-   * **COMPILED_QUERIES=** - defines whether the LINQ Compiled queries should be generated. +
-   * **CONVERT_DEPEND_LIBS=** - specifies that dependent libraries should be ignored after migration of Progress 4GL procedures if libraries are not selected for migration. Please note that this option doesn't not switch off reading of all necessary information from libraries required for procedures, it means that libraries will be migrated independently. +
-   * **TEMP_TABLES_PREFIX=** - defines whether the "tt" prefix should be removed from the temporary tables. +
-   * **GENERATE_TRANSACTIONSCOPE=** - generates TransactionScope for 4GL transactions. +
-   * **PROJECT_NAMESPACE=** - specifies project namespace+
-   * **SAVE_4GL_QUERIES=** - allows to see source 4GL queries in comments inside the converted target code+
-   * **GENERATE_SYSTEM_PARAMETERS=** - add system parameters to constructor declarations of initial parameters. +
-   * **PARSER_PR_4GL=** - allows to parse unix escape characters. +
- +
- +
- +
-\\ +
-Ispirer Note: +
-   To use EDM model please perform the following steps: +
-   1.   Create “db” folder in root source directory  +
-   2.   Rename your edmx model file to “DataClasses.edmx” and place it in “db” folder +
  
 \\ \\
Line 92: Line 96:
 ====== ====== ====== ======
  
-If you face any issues or have any questions on how to migrate Progress 4GL code to .NET in command line, please contact our support team: [[[email protected]]]+If you face any issues or have any questions on how to migrate Progress 4GL code to Microsoft SQL Server in command line, please contact our support team: [[[email protected]]]
  
  
  
-\\ 
-[[http://www.ispirer.com|Ispirer Home Page]] 
-[[http://www.ispirer.com|Ispirer SQLWays Migration Product Page]] 
-[[http://www.ispirer.com/?click=RequestSQLWays&from=IspirerWIKI|Request SQLWays]] 
 \\ \\

© 1999-2024, Ispirer Systems, LLC. All Rights Reserved.