Microsoft SQL Server
Microsoft SQL Server is a relational database management system developed by Microsoft.
There are different technologies you can use to access Microsoft SQL Server from web applications developed with HTML5 Builder:
- The Database component, documented below. Requirements: Native Client, PHP driver, PHP PDO extension, PHP extension.
- PHP functions, documented here. Requirements: Native Client, PHP driver, PHP extension.
This will install the driver in HTML5 Builder’s internal web server. To install them on your deployment sever, you will need to repeat the steps providing the path of your server’s PHP extensions directory during the seconds step above.
Contents
Installation
Native Client
To install the Microsoft SQL Server Native Client:
- Download the installer from the Microsoft Download Center: x86 or x64.
- Run the downloaded installer.
PHP Driver
To install the PHP driver for Microsoft SQL Server:
- Download the installer from the Microsoft Download Center.
- Run the downloaded installer, and when you are asked where to extract the files, provide the path to the \php\ext folder in the HTML5 Builder installation directory.
PHP PDO Extension
Enable the extension by uncommenting (removing the ;
at the beginning) the following line in PHP’s configuration file (php.ini):
;extension=php_pdo_mssql.dll
→extension=php_pdo_sqlsrv_53_ts.dll
- For HTML5 Builder’s internal server, apply the changes to the php.ini.template file.
PHP Extension
Enable the extension by adding the following line to PHP’s configuration file (php.ini):
extension=php_sqlsrv_53_ts.dll
- For HTML5 Builder’s internal server, apply the changes to the php.ini.template file.
Configuration
To use a Database component with Microsoft SQL Server, configure it with the following property values:
- DriverName: mssql.
- Host: This should be filled with the database server address and server instance name, separated by a backslash (\). For example: 127.0.0.1\SQLServer.
Then fill the rest of the mandatory properties as required.
Help Resources
Documentation
Frequently Encountered Problems
Microsoft SQL Server Express 2005
- If you are connecting to a Microsoft SQL Server Express 2005 and you cannot establish a connection, it will probably be because your version of ntwdblib.dll is not letting PHP access the server, you will need a newer one. You can get it from your HTML5 Builder installation folder, inside php subfolder (php\ntwdblib.dll). You should then place that .dll in a directory in the global path, for example: C:\Windows.