Need help - ssp.class.php for MSSQL

Need help - ssp.class.php for MSSQL

pooja_ambrepooja_ambre Posts: 3Questions: 1Answers: 0

Hi All

I am using datatable server side processing and trying to connect to a MSSQL database. However, have been struggling with ssp.class.php for MSSQL.
I have modified the class as below:
static function sql_connect ( $sql_details )
{
try {
$db = @new PDO('sqlsrv:Server={$sql_details['host']};Database={$sql_details['db']}',$sql_details['user'],$sql_details['pass'],array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION ));
}
catch (PDOException $e) {
self::fatal(
"An error occurred while connecting to the database. ".
"The error reported by the server was: ".$e->getMessage()
);
}
return $db;
}

Now, I am getting an AJAX 500 error. Could someone please let me know if the changes I did to the ssp.class.php are correct and the how can the AJAX error be rectified? Please do let me know incase more details are needed from my end.

Thanks in advance!

Regards,
Pooja

Answers

  • pooja_ambrepooja_ambre Posts: 3Questions: 1Answers: 0

    I have managed to get rid of the AJAX error as well as the SQL error. I see the data in response in the developer console. The pagination also shows Showing 1 to 10 of 4,070 entries but I do not see the data within the table ...it says No matching records found.

    Could someone please advise on what I am missing?

    Thanks,
    Pooja

This discussion has been closed.