MSSQL db connection

MSSQL db connection

boudgaboudga Posts: 19Questions: 4Answers: 0

I believe I have made a successful MSSQL connection from PHP with the DataTables Editor config file. However, when I initialise the Editor I get no results and no datatable displayed. Is there some preferred method to determine if the db connection was successful with the data abstraction layer code provided in the lib?

I used the editor debug function for the browser console and saw nothing that jumped out at me as an error. I also have no browser console errors.

Please advise

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,202Questions: 1Answers: 2,592

    If you look at the browser's network tab, in the developer tools section, you'll see the traffic to and from the server. Please could you look at the request being made as the table initialises, and see what the server response is. That should give us some clues.

    Colin

  • boudgaboudga Posts: 19Questions: 4Answers: 0
    edited March 2023

    OK I have done quite a bit of tweaking and I have a "loading" message appearing in my table. In the broswer developer tools -> Network tab the file the ajax is trying to load is successfully loading the data as I see this in the response:

    [
        {
            "citemno": "2PKKTE",
            "cdescript": "2-PACK KITCHEN TOWEL",
            "cproducttype1": "",
    

    etc etc

    But it is not getting loaded into the datatable???

  • allanallan Posts: 62,211Questions: 1Answers: 10,205 Site admin
    Answer ✓

    Based on that data structure, have you set the ajax.dataSrc option to be an empty string?

    Allan

  • boudgaboudga Posts: 19Questions: 4Answers: 0

    That resolved my Issue Allan. Thank you!

Sign In or Register to comment.