i have an error with gridphp 2.8
$db_conf = array();
$db_conf[“type”] = “odbc_mssql”;
$db_conf[“server”] = “Driver={SQL Server};Server=65.66.168.221;Database=CCCDSSDSDS;”;
$db_conf[“user”] = “sa333”;
$db_conf[“password”] = “CCCC*”;
$db_conf[“database”] = “CCCDSSDSDS”;
when initial loading the page
1 – shows no data only window error without error text.
2 – on autocomplete if i put this on autocomplete field: JUAN, shows no data only window error without error text
3 – but if i put JUAN JOSE on autocomplete field, i works fine.
i can see the problem is with special characters like “á é í ó ñ” etc. when reading sqlserver data
how can you fix it?
Hi,
I’d recommend to use latest mssql php driver to connect to sql server. It supports utf8 characters in a much better way.
e.g.1
$db_conf = array(); $db_conf["type"] = "mssqlnative"; $db_conf["server"] = "den1.mssql5.host"; // or ip:port $db_conf["user"] = 'user'; $db_conf["password"] = 'pass'; $db_conf["database"] = "testdb";
e.g.2
$db_conf = array(); $db_conf["type"] = "mssqlnative"; // or mssql $db_conf["server"] = "(local)\sqlexpress"; // ip:port $db_conf["user"] = ""; $db_conf["password"] = ""; $db_conf["database"] = "master";
If you are already using odbc+mssql with special characters, Please send me independent code showing odbc connection setting with php and I’ll send you equivalent code for datagrid.
Hi,
Just wanted to know if this issue is solved?
using this driver
$db_conf = array();
$db_conf[“type”] = “odbc_mssql”;
$db_conf[“server”] = “Driver={SQL Server};Server=65.66.168.221;Database=CCCDSSDSDS;”;
$db_conf[“user”] = “sa333”;
$db_conf[“password”] = “CCCC*”;
$db_conf[“database”] = “CCCDSSDSDS”;
Problem solved with your help using this.
$opt[“utf8encode”] = true;
thank you.