3 Replies Latest reply on Jan 24, 2016 9:33 PM by BKBK

    Multiple Query [java.lang.NullPointerException]

    adrianh4955335

      i have function for running multiple query MariaDB. but i have problem with cfquery.
      <cffunction name="testQuery">

      <cftry>

          <cfquery name="qResult" datasource="dbsf_mariadev" result="qResult">

           BEGIN;

           DROP PROCEDURE if exists SF6COLA_INSERTTBL;

           CREATE PROCEDURE SF6COLA_INSERTTBL()

           LANGUAGE SQL

           BEGIN

                IF (select id from __contoh01 where id=1 and nilai=1) THEN

                BEGIN

                update __CONTOH01 set id=1,nilai=1 where id=1 and nilai=1;

                END;

                ELSE

                BEGIN

                insert ignore into __contoh01 (id,nilai) values (1,1) ON DUPLICATE KEY UPDATE id=1 , nilai=1;

                END;

                END IF;

          END;

          CALL SF6COLA_INSERTTBL();

          COMMIT;

          </cfquery>

          <cfdump var="#qResult#"/>

      <cfcatch><cfdump var="#cfcatch#"/></cfcatch>

      </cftry>

      </cffunction>

       

      result:
      testingQuery.png

       

      please help me to solved this case.