Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
71 views
in Technique[技术] by (71.8m points)

javascript - I cannot connect between node.js and oracle

I want to connect to oracle on different server with Node.js. I'm getting the "Error while trying to retrieve text for error ORA-01804" error. Although I did a lot of research, I could not reach a positive result. I think a few files are missing. But I don't know what files are missing. What is your suggestion as a solution?

const oracledb = require('oracledb')
oracledb.getConnection({
    user: 'myUser',
    password: 'myPass',
    connectString: '192.168.1.162/PRVS'
},
    function (err, connection) {
        if (err) {
            console.error(err.message);
            return;
        }
        else {
            connection.execute(
                'SELECT * from myTable',
                [12],
                {
                    maxRows: 1
                },
                function (err, result) {
                    if (err) {
                        console.error(err.message)
                        doRelease(connection)
                        return;
                    }
                    console.log(results.rows)
                    doRelease(connection)
                }
            )
        }
        connection.close(
            function (err) {
                if (err) {
                    console.error(err.message);
                }
            }
        )
    }
)
question from:https://stackoverflow.com/questions/65841338/i-cannot-connect-between-node-js-and-oracle

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...