-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
queryString = `INSERT INTO TABLENAME ( DATEBORN ) VALUES ( to_date(:dtb, 'DD.MM.YYYY') )`;
optionsObj = {
autoCommit: true,
bindDefs: {
dtb: { type: oracledb.DATE }
}
}
bindsArr =[ { dtb: '11.05.2019' }, { dtb: '20.06.2019' } ]
connection = await oracledb.getConnection(
{
user: dbConfig.user,
password: dbConfig.password,
connectString: dbConfig.connectString
});
// There error: [Error: NJS-011: encountered bind value and type mismatch]
result = await connection.executeMany(
queryString
,bindsArr
,optionsObj
);
I can't insert the date into the database using executeMany. There is no problem with other types of data.
Also, the date is successfully added using execute.
What am I doing wrong?