Skip to content

JSON is cut after call store procedure. #46

Description

@jgauna

I'm working with a store procedure which returns JSON. Calling it with Sqldeveloper works great but using:

var sqlGetQuestions = 'call WEBAPPPORTALPM.pk_portal_n.preguntas_registro(:1, :2)',
            questionsAndAnswers = new oracle.OutParam(oracle.OCCISTRING);
        dataSource.connector.execute(sqlGetQuestions, [credential,
            questionsAndAnswers
        ], function(err, response) {
            // We use an internal callback to chain stores procedures. @TODO: Use promises instead callbacks.
            utils.streamResponseInternal({
                err: err,
                response: response
            }, internalCb);
        });

returns:

{ updateCount: 0,
  returnParam: '{"questions":[{"title"   :"Indique el número de integrantes de su grupo familiar, incluido usted","options" :["3","7","2","1","Ninguno de éstos"],"correct" :4},{"title"   :"Indique el día de su cum' }

Where an ok json should be:

{"questions":[{"title"   :"Indique el número de integrantes de su grupo familiar, incluido usted","options" :["8","1","4","9","Ninguno de éstos"],"correct" :2},{"title"   :"Indique el día de su cumpleaños","options" :["16 de Agosto","13 de Junio","25 de Septiembre","18 de Junio","Ninguno de éstos"],"correct" :3},{"title"   :"Indique el nombre de un familiar de su grupo","options" :["Marvin","Vivian","Alexia","Sook","Ninguno de éstos"],"correct" :5},{"title"   :"Indique el número de su domicilio","options" :["7717","4039","2140","1576","Ninguno de éstos"],"correct" :2}]}

Any clue on this ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions