I have a problem with datatables serve side processing using SQL Server/MSSQL, i've been following or use this tutorial link but its quite difficult to modify it using sql server
In sql server doesn't allow using limit, i try to use this code below but it wont work
SELECT *
FROM
( SELECT *, ROW_NUMBER() OVER (ORDER BY id) as NroFila
FROM mytables
) AS PAG_TABLEXXX
WHERE
NroFila BETWEEN 0 AND 10
and this the function made my datatables wont work.
function get_datatables()
{
$this->_get_datatables_query();
if($_POST['length'] != -1)
$this->db->limit($_POST['length'], $_POST['start']);
$query = $this->db->get();
return $query->result();
}
this is the erro show, im using firebug to get error.
Severity: Warning
Message: odbc_exec(): SQL error: [Microsoft][SQL Server Native Client 10.0][SQL Server]Executing SQL directly; no cursor., SQL state 01000 in SQLExecDirect
Filename: odbc/odbc_driver.php
Line Number: 138