Show/Hide Toolbars

Navigation: Using PHPRunner

PHPrunner32x32     PHPRunner manual


Connecting to the database

Scroll Prev Next More

 

PHPRunner supports the following databases: MySQL, Oracle, Microsoft SQL Server, MS Access, PostgreSQL, Spreadsheet File, Informix, DB2, SQLite, SQL Server Compact, and any ODBC-enabled databases.

intro_choose_the_db_type

 

Select the database type and press Next>>. Depending on the selected database type, one of the database-specific dialog boxes shown below appears on the screen.

 

yellowbulbNote: use Recent connections to connect to the previously opened databases quickly.

Connecting to MySQL/MariaDB

Type in the Host/Server Name (usually - localhost), user name, password, and click Connect. See How to install local server. to learn more about installing a local web server.

intro_connect_to_the_database

 

Select the Database and click Next >>.

 

If your MySQL server doesn't allow remote connection, you can connect via PHP.

Connecting to PostgreSQL

Type in the Host/Server Name (usually - localhost), user name, password, set the additional parameters if required (use space as the delimiter, e.g., key1=value1 key2=value2), and click Connect.

connectdb_postgres

 

Select the Database and click Next >>.

 

If your PostgreSQL server doesn't allow remote connection, you can connect via PHP.

Connecting to Oracle, Microsoft SQL Server, Informix, DB2

Type in the Host/Server name, Database Name, username, password, and click Connect.

Connecting to MS Access, spreadsheet file, SQLite

Choose the Spreadsheet File option to select an Excel, FoxPro, DBase, Paradox, or text database file.

 

Define the file path to your database/spreadsheet file, enter the login and password if required. Click Next >>.

step2-1

 

PHPRunner will try to find which ODBC driver to use to connect to the selected database file. Select the Select ODBC driver manually checkbox if you'd like to select the ODBC driver manually.

 
To learn more about connecting to MS Access, see Connecting to MS Access database.

Connecting to ODBC Data Source

If you already have an ODBC Data Source Name (DSN) associated with your database, select ODBC DSN from the list box. Enter the Login and Password if required. Press Next>> to continue.

 

To create a new DSN, press the ODBC Admin button. Add a new DSN in the popup, then click Refresh list.

step2-2

Connecting through ODBC driver dialog

Choose this option to connect directly through the ODBC driver dialog.

 

Select the ODBC driver from the list of available ODBC drivers and click Next>>.

step2-3

Create a new MS Access database

If you do not have a database yet, choose this option and click Next>>. PHPRunner creates a new empty MS Access database with this option.

 

Use the Create new table window to create new tables in your database.

step3-0

 

Type in the name, type, size, scale (applies to the DECIMAL field type in SQL Server, Oracle and MySQL only) for each field. Set the Primary key field.

 

Databases created with PHPRunner are saved to the project directory, for example, database.mdb.

 

yellowbulbNote: Don't change the database settings after you've built your project and added records into the database. All data will be lost after the database settings modification.

 

After successfully connecting to the database, you can select the datasource tables.

Downloading drivers

If you use a 32-bit version of PHPRunner, you need to download the 32-bit drivers. If you use a 64-bit version of PHPRunner, download the 64-bit drivers.

 

32-bit drivers:

Oracle - Download link (requires an Oracle account).

Informix - Download link (requires an IBM account).

DB2 - Download link.

 

64-bit drivers:

Oracle - Download link (requires an Oracle account).

Informix - Download link (requires an IBM account).

DB2:

 - version 9.7 - Download link;

 - version 10.1 - Download link;

 - version 10.5 - Download link.