Skip to the main content.
Downloads Try Thriftly
Downloads Try Thriftly
Group 762

Migrate and run DataFlex applications with Oracle, MS SQL Server, PostgreSQL, MySQL &  MariaDB.

flex2Crystal

Stuck in Crystal XI?  Upgrade and use the latest versions of Crystal Reports with DataFlex applications. 

BTR2SQL

Convert from Btrieve / P.SQL / Actian transactional engines to Oracle, MS SQL Server, and PostgreSQL

thriftly-1

Quickly build multi-protocol web services with the same API. Supports JSON-RPC, REST, SOAP,  Thrift, and gRPC.

 Group 671-1

 

Why Mertech?

1 min read

Write Your Own Migration Routines Using the CONVERT_DAT_FILE Macro

Mertech provides a macro, CONVERT_DAT_FILE that can be called from a DataFlex program using the Mertech.inc file. This macro will migrate a DataFlex file to the target backend, creating table and index structures and copying data using the default settings of the GUI database migration tool.

Using CONVERT_DAT_FILE, you can write your own custom migration routines to handle migrations at remote sites.

For a full description of CONVERT_DAT_FILE see the Mertech Command Reference (mertech.inc.html)  installed in (<programfiles>Mertech Data SystemsDB DriversDataFlex help)


Example

Use Mertech.inc
login <Server> <User> <Password> <Driver>
//For SQLFlex, MySQLFlex or PgFlex
if (sDataBase <> "NULL") Begin
  SET_DATABASE_NAME to sDataBase
  SQL_USE_DATABASE     sDataBase
  End
If (Err) Begin
  Showln "Login Error !"
  Inkey Pageend
End
MERTECH_WARNING_MESSAGE DISABLED
open "customer" as customer
CONVERT_DAT_FILE customer.file_number
close customer
Showln
Showln "Done ..."
Inkey Pageend

 

Note: If you are using Mertech V12 drivers, you can also programatically determine how the driver handles table and field names: a) convert to upper case, b) convert to lower case, or c) keep all cases as stored in Dataflex (default). For additional information see  Mertech Tech Tips - Case Handling

Note: For the migration process, the Oracle user must have CONNECT, RESOURCE and DBA rights. This is required because ORAFlex needs to access some views and tables in SYS schema to define the extends and storage for creating the new table.


 

Legacy Application Modernization: Key Steps, Benefits & Best Practices

Legacy Application Modernization: Key Steps, Benefits & Best Practices

This blog post was co-authored with Riaz Merchant, President and CEO at Mertech. In the fast-paced software world, 'legacy' often signals a warning.

Read More
Hybrid Cloud Migration: Plan, Process and Advantages

Hybrid Cloud Migration: Plan, Process and Advantages

This post was co-authored with Riaz Merchant, President/CEO at Mertech Data Systems, Inc.

Read More
Financial Benefits of Cloud Migration & Hybrid Cloud Applications

Financial Benefits of Cloud Migration & Hybrid Cloud Applications

Shifting from your traditional legacy systems to the Cloud can be a game changer, as the benefits of cloud migration are numerous. Cloud computing...

Read More