It seems you use code for "ARI Data Tables" extension. "ARI Data Tables" and "ARI Smart Content" are two different extension. Documentation for "ARI Smart Content" is available
here.
Modules from "ARI Smart Content" can be loaded with help of "System - ARI Smart Content - Load Module" plugin. The documentation is
here. Check that the plugin is enabled.
The solution which provides works 100% for "ARI Smart Content - Data Table" with enabled "Server side pagination". If it doesn't work, your query or configuration are wrong. We can investigate the problem if you reproduce the problem on a public server and provide a link to a page where the problem occurs and a temporary access to J! backend by
email.
Regards,
ARI Soft