Developers/OracleDB
nodejs + oracledb error handling ORA-00984 column not allowed here
__APPA
2021. 2. 2. 16:59
클라이언트에서 전송하는 req.body string을 SQL 쿼리에 넣기 위해서 `` (백틱) 사용시
(req, res) => {
const { a, b, c } = req.body;
oracleDb.getConnection({
user: 'user',
password: 'password',
connectString: 'localhost/XE'
}, (err, connection) => {
let result = connection.execute( `insert into main values (${a}, ${b}, ${c})` )
console.log(result)
})
}
[Error: ORA-00984: column not allowed here] 이 발생한다.