Do you use server side processing for your data type? Because your doc link points to server-side configuration for Datatables. Imho 1000 lines should be easily visualized by the client using the "classic" Datatable methods. Also, the parameters indicated on your linked page apply to the server side of the script to process the correct data for the table. This means that the length value tells the server (!) How many lines it should return. Thus, your page has nothing to do with setting a "datatable" on the client side.
So, to adjust the displayed number of rows on the "client side", use the pageLength value:
$(document).ready(function() { $('#example').dataTable( { "pageLength": 20 } ); } );
You can also configure lengthMenu to set a drop-down list in which the user can specify how many lines he wants to see on the page:
$(document).ready(function() { $('#example').dataTable( { "lengthMenu": [20, 40, 60, 80, 100], "pageLength": 20 } ); } );
See a working demo here: http://jsfiddle.net/vf5wA/2/
EDIT:
I think your problem is that you are returning a full set of elements for each individual request. As far as I know, datatables works a little differently. In your SQL-Statement, you set LIMIT to 1000, which means that 1000 rows will be returned by your api. But Datatable gives you the parameter "iDisplayLength", which should be passed to your api via AJAX-Call. The number of elements specified in "iDisplayLength", then set the LIMIT for your SQL query.
eg:.
AJAX-Call: https:
And on your server, the "iDisplayLength" parameter will set the LIMIT for the request:
String sql = "SELECT UID,LastName,FirstName FROM employe LIMIT {iDisplayLength}"; object.put("iTotalRecords", {iDisplayLength});
I would try this, but I never used server-side processing for Datatables, so this is just a shot in the dark.