MSSQL blank grid

QuestionsMSSQL blank grid
Miguel asked 2 years ago

My config using db-layer-sqlsrv.php

$db_conf = array();
$db_conf[“type”] = “mssql”; // or mssql mssqlnative
$db_conf[“server”] = “192.192.100.121:1433”; // 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?

Thanks

Miguel

2 Answers
Miguel answered 2 years ago

After activating display errors, i get this error:

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

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

Miguel replied 2 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?

thanks

Abu Ghufran Staff answered 2 years ago

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

To install: https://www.phpgrid.org/faqs/#74

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

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

Miguel replied 2 years ago

Working,

Thanks Abu

Your Answer

13 + 4 =

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?