Closed gregz07 closed 2 years ago
You're not the first to get bitten by this. Note there is a spelling mistake in your bind variable name. In one you have SDT
and in the other STD
. They need to be the same!
Thats just a typo , in the code its fine.
I can only go by what you have posted (and have now edited to be correct). That error (ORA-01036: illegal variable name/number) is what results when you have such "typos". :-)
And you were absolutely right, STD's strike even in the programming world. Thank you for your time and patience
Full code `
if (k === 'startDate') {
if (whereString !== whereBase) {
whereString = whereString.concat(` AND t.LOG_TS >= :SDT `);
} else {
whereString = whereString.concat(` t.LOG_TS >= :STD `);
}
const starDate: string = filters['startDate' as keyof Object].toString();
whereVals.STD = { val: new Date(starDate), type: oracledb.DATE, dir: oracledb.BIND_IN };
}`
What versions are you using?
https://github.com/oracle/node-oracledb/releases/download/v5.2.0/oracledb-src-5.2.0.tgz
Is it an error or a hang or a crash?
What error(s) or behavior you are seeing?
[Error: ORA-01036: illegal variable name/number]
` const oracledb = require('oracledb');
`
I should note that this only happens when I try to conjugate both params.
If I remove the ACT_ID in the query and in the bindParams, it works. Or If I remove the STD from the query and the bindParams, also works.
WORKS `
// code
` WORKS
`
// code
`