Skip to the main content.
Downloads Thriftly Login
Downloads Thriftly Login
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

Seamlessly convert from Btrieve transactional database to PostgreSQL, Oracle, and MS SQL Server.

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.


 

Why Migrate from Btrieve to PostgreSQL and other Relational Databases?

Why Migrate from Btrieve to PostgreSQL and other Relational Databases?

Introduction Many independent software vendors (ISV) and corporate users still rely on applications that use a category of database collective called...

Read More
Four Challenges in Converting COBOL Applications from ISAM Databases to Relational Databases

Four Challenges in Converting COBOL Applications from ISAM Databases to Relational Databases

COBOL applications are the foundation of numerous essential business functions, especially within the banking, insurance, and government sectors....

Read More
Application Modernization 101: Ultimate Guide to Digital Transformation

Application Modernization 101: Ultimate Guide to Digital Transformation

Imagine breaking free from the constraints of old, monolithic systems and embracing the agility and innovation of cloud-based solutions.

Read More