[All]
How to connect to an ODBC Database
摘要: Basic steps to get connected to any database with ODBC connectivity
Below are basic steps to get Delphi for PHP to connect to an ODBC Database
- in Control Panel, run the ODBC Data Source Administator, create a DSN to your database and test that it works. If you are unfamiliar with this step, contact the vendor of your ODBC driver.
- Create a database component in Delphi for PHP. Set the DriverName property of the database component to odbc.
- Set the Host property of the database component to the DSN name you created in step 1.
- If your DSN did not have a UserName or UserPassword, set those properties of the Database component as well.
- Connect components to use your database, such as Table or Query, a datasource and a grid.
- Set the Connected property of your database to true and the Active property of your Table or Query to True.