How to connect to a Database via ADO

Abstract: Basic steps to connect to any database with ADO connectivity with Delphi for PHP

Below are basic steps to get Delphi for PHP to connect to a Database via ADO

  1. Get a connection string from your vendor which connects to your database via ADO. Here are some examples for InterBase using the ADO to ODBC provider.
  2. Create a database component in Delphi for PHP. Set the DriverName property of the database component to odo.
  3. Set the Host property of the database component to the connection string you got in step 1.
  4. If your connection string did not have a UserName or UserPassword, set those properties of the Database component as well.
  5. Connect components to use your database, such as Table or Query, a datasource and a grid.
  6. Set the Connected property of your database to true and the Active property of your Table or Query to True.