DataTables warning

DataTables warning

deliatordeliator Posts: 95Questions: 1Answers: 0

Hello,

I always get an error when searching in my DT
DataTables warning: table id=DataTables_Table_0 - Ajax error

Pagination and sort are working correctly.

Any idea ?

Marc

Replies

  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin

    Sounds like the server is sending back something other than a 200 code. What is it sending back?

    Allan

  • deliatordeliator Posts: 95Questions: 1Answers: 0

    When i take a look at the console :
    500 (Error Executing Database Query.)

    And here is the select i use for the search

        SELECT DOS.NR_PAT Patient, PAT.FNAAM_PAT||' '||VNAAM_PAT Nom, DM_DOS.DOSSIER Dossier
             , DM_DOS.DT_ADMIN, DM_DOS.MEDECIN, DOCT.FNAAM_DOK||' '||DOCT.VNAAM_DOK NOM_MED, DM_DOS.UDS, UDS.VEOMS Service
             , decode(KODE_DOS_TYPE,'V','HOSPI','A','AMBU','N','HDJ',KODE_DOS_TYPE) Type_Sejour, dos.DAT_OPN Dt_entree, dos.DAT_EINDE Dt_Sortie    
             , DM_DOS.SERIE, DM_DOS.STENT, DM_DOS.ACHEVE, DM_DOS.HISTORISE, DM_DOS.SITE, DM_DOS.REMARQUE
             , DM_DOS.DT_CREATION, DM_DOS.DT_MODIF, DM_DOS.ID_DOSSIER
        FROM IFH.DM_DOSSIER DM_DOS
            , ORAAPOT124.DOSSIER@prodinfo DOS
            , ORAAPOT124.TAB_PAT@prodinfo PAT
            , ORAAPOT124.TAB_DOKTERS@prodinfo DOCT
            , ORAAPOT124.VERPLEEG@prodinfo UDS
            WHERE 1 = 1
            AND DM_DOS.DOSSIER = DOS.NR_DOS
            AND DOS.NR_PAT = PAT.NR_PAT
            AND DM_DOS.MEDECIN = DOCT.NR_DOK
            AND DM_DOS.UDS = UDS.VENR   
            <cfif len(search)>
                OR lower(Patient) LIKE '#lcase(search)#%' 
                OR lower(Nom) LIKE '%#lcase(search)#%'
            </cfif>
            <cfif len(orderBy)>
                ORDER BY #orderBy# #orderByDir#
            </cfif>
    
    
  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin

    That's an SQL error in that case. I'm afraid I don't know what is causing it though. Perhaps have a look at your server's error logs to see if it states any error information.

    Allan

  • deliatordeliator Posts: 95Questions: 1Answers: 0
    edited June 2017

    Log said that effectively an sql error is present, looking for the resolution of that error, thanks Allan :-)

This discussion has been closed.