I'm trying to run node-odbc against vertica and I'm getting a strange error when running a simple prepared statement.
The row is inserted in the db, but the program exits at statement.execute()
with this error:
$ node index.js
undefined:0Error: Invalid argument
const odbc = require('odbc');
async function executeExample() {
const connection = await odbc.connect('Driver=/Library/Vertica/ODBC/lib/libverticaodbc.dylib;Servername=localhost;Port=5433;Database=testdb;UserName=dbadmin;Password=')
const statement = await connection.createStatement();
await statement.prepare('INSERT INTO testtable (name) VALUES(?)');
await statement.bind(['joe']);
const result = await statement.execute();
console.log(result);
await statement.close();
await connection.close();
}
executeExample();