Introduction

The PowerBuilder installable cloud apps support the following database types: SQL Anywhere (ODBC), PostgreSQL, SQL Server, MySQL, Informix, Oracle, and Adaptive Server Enterprise (ODBC). Please refer to Supported database types & versions for more information about the supported database types and versions.

This tutorial provides step-by-step instructions for how to connect to different types of database from the Database Configuration dialog box in the PowerBuilder IDE.

The Database Configuration dialog box can be opened by 1) opening the PowerServer project painter in the PowerBuilder IDE, 2) selecting the Web APIs tab, 3) clicking the Database Configuration button, and then 4) clicking the New button.

Here are some information that you shall be noticed before reading this tutorial:

  • The database server to be connected should be configured properly.

  • PowerBuilder IDE is installed in a Windows 10 64-bit machine in this tutorial.

  • ODBC Data Source (64-bit) is used whenever ODBC is needed in this tutorial.

  • The IP address in this tutorial should be replaced with your actual IP address.

  • In order for PowerServer to utilize these database connections, after you configure the Database Configuration dialog box, you will also need to:

    1. Click the DB Drivers button to select the database driver and the option "I have read and agree to the license ..." so that the driver can be downloaded automatically from NuGet to PowerServer later.

    2. Map the transaction object with the database connection that was just configured in the Database Configuration dialog box. PowerServer determines which connection cache to use according to the transaction object in use (the connection string in the PowerScript will be ignored).

    For more about how PowerServer works with the database connections, refer to Working with Database Connections.

  • When the PowerServer project is built and deployed in the PowerBuilder IDE, the database connection configured in the Database Configuration dialog box and the transaction-to-cache mappings will be deployed and stored in the PowerServer C# solution. You can manually change these settings in the PowerServer C# solution later.