If the driver is installed you should also install the needed libraries for the appropriate database.
For example in order to connect from linux machine to the MS SQL server additional software shuld be installed.
1. Install ODBC library
2. Download and configure FreeTDS with-unixodbc
3. install php-odbc and unixODBC
4. Setup ODBC links
Currently jqGrid support the following databases with the ODBC driver:
The only diference is that we need to pass a new parammeter to jqGrid instance defining the type of the database.
The databases have following name convention which should be passed to the instance in case of ODBC
Setup ODBC links
Microsoft SQL Server - sqlsrv
MySQL - mysql
PostgreSQL - pgsql
SQLite - sqlite
Below is example on connectiong to the MSSQL server.
<?php .... //include the jqGrid Class require_once "jqGrid.php"; // include the ODBC driver class require_once "jqGridODBC.php"; try { // connection $dbh = odbc_connect("Driver={SQL Server Native Client 10.0};Server=MYSERVER;Database=MYDATABASE;", "user", "password"); } catch (Exception $exception) { echo $exception->getMessage(); exit; } // Create the jqGrid instance passing the 'sqlsrv' as second parameter $grid = new jqGridRender($dbh, 'sqlsrv'); ... ?>