Hello,

We’ve just added improved support to use our PHP Data Grid with MS SQL Server. The demo browser that comes with the product can now be tested with SQL Server database along with MySQL database.

To install demos with PHP and MS SQL Server, Download the package from our download page and then install the database from the MS SQL Server database script.

To connect MS SQL Server, you must have SQL Server Native driver for PHP installed on your environment. Next you can use one of the following connection settings to be set in config.php. For example:

// Using PDO
define("PHPGRID_DBTYPE","pdo");
define("PHPGRID_DBHOST","sqlsrv:Server=den1.mssql5.gear.host");
define("PHPGRID_DBUSER","testdb63");
define("PHPGRID_DBPASS","testpass");
define("PHPGRID_DBNAME","testdb63");

// Using PHP Native SQL Server Driver
define("PHPGRID_DBTYPE","mssqlnative");
define("PHPGRID_DBHOST","den1.mssql5.gear.host");
define("PHPGRID_DBUSER","testdb63");
define("PHPGRID_DBPASS","testpass");
define("PHPGRID_DBNAME","testdb63");

// Using OBDC Driver
define("PHPGRID_DBTYPE","odbc_mssql");
define("PHPGRID_DBHOST","Driver={SQL Server};Server=den1.mssql5.gear.host;Database=testdb63;");
define("PHPGRID_DBUSER","testdb63");
define("PHPGRID_DBPASS","testpass");
define("PHPGRID_DBNAME",null);

Troubleshooting:

Best way to troubleshoot database connection is to make an independent php file with just php-sqlserver connection code as shown in php manual. When it works, just put the verified configuration in config.php file of php data grid.

What Next:

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?