Skip to content Skip to sidebar Skip to footer

Consuming Web Service And Inserting Clob Using Node.js To Oracle Database Table

i need to consume third party webservice using node js and write it on oracle table . basically i got the code for getting the data. Basically need to take that output and insert i

Solution 1:

Some resources:

For example:

// Insert a CLOBconst str = fs.readFileSync(clobInFileName, 'utf8');
    result = await connection.execute(
      `INSERT INTO no_lobs (id, c) VALUES (:id, :c)`,
      { id: 1, c: str }
    );
    if (result.rowsAffected != 1)
      thrownewError('CLOB was not inserted');
    elseconsole.log('CLOB inserted from ' + clobInFileName);

In your case you would read str from your web service instead of a disk file. Since I don't know what that web service is, I can't comment more.

Installation instructions for node-oracledb are here.

Post a Comment for "Consuming Web Service And Inserting Clob Using Node.js To Oracle Database Table"