I am trying to connect MSSQL Database Server Using PHP PDO Object Like This:
$dsn='mssql:host=***.***.***.***;dbname=***';
$username='***';
$passwd='***';
try{
$baglanti=new PDO($dsn,$username,$passwd);
$baglanti->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
$baglanti->exec("SET NAMES UTF8");
ini_set('max_execution_time', 2000000);
}catch(PDOException $e){
echo $e->getMessage();
}
I am getting this error after this coding:
SQLSTATE[HY000]: General error: 10007 'NAMES' is not a recognized SET option. [10007] (severity 5)
How can I perform this issue?
Thanks