MSSQL blank grid

QuestionsMSSQL blank grid
Miguel asked 6 years ago

My config using db-layer-sqlsrv.php

$db_conf = array();
$db_conf[“type”] = “mssql”; // or mssql mssqlnative
$db_conf[“server”] = “”; // ip:port
$db_conf[“user”] = “sa”;
$db_conf[“password”] = “xxxxxx”;
$db_conf[“database”] = “BDSis”;

$g->table = “[BDSis].[dbo].[CONTACTOS]”;
$g->select_command = “Select * from CONTACTOS”;

I am geting blank grid, no errors on load. What i am doing wrong?



2 Answers
Miguel answered 6 years ago

After activating display errors, i get this error:

Warning: mssql_connect(): Unable to connect to server: in /var/www/html/phpgrid/lib/inc/adodb/drivers/ on line 614

I can connect to server with Microsoft sql server manager and Navicat

Miguel replied 6 years ago

After checking mssql_connect is deprecated, actually for new versions of php and microsoft sql server drivers function is sqlsrv_connect. Is there any update on phpgrid for this?


Abu Ghufran Staff answered 6 years ago

It is recommended to use ‘mssqlnative’ extension instead of ‘mssql’.
The older one is outdated by Microsoft & PHP.

To install:

Abu Ghufran - Dev Team
Grid 4 PHP Framework
Abu Ghufran Staff replied 6 years ago

If you have extension installed and enabled, You only need to change type to:
$db_conf[“type”] = “mssqlnative”;

Miguel replied 6 years ago


Thanks Abu

Your Answer

20 + 0 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?