I created an action into IbM Cloud Fucntions to insert data into DB2.
I declare the variable DSN with the credentials given by IBM.
var dsn = "DATABASE=BLUDB;HOSTNAME=dashdb-entry-yp-dal09-08.services.dal.bluemix.net;PORT=50000;PROTOCOL=TCPIP;UID=dash100113;PWD=*******"
I got this error:
message : "[IBM][CLI Driver] CLI0199E Invalid connection string attribute. SQLSTATE=08001"
This is the code I use to insert the data:
function insertClient(dsn) {
try {
var conn=ibmdb.openSync(dsn);
var data=conn.querySync("insert into client (name) values ('jamie')");
conn.closeSync();
return {result : data};
} catch (e) {
return { dberror : e }
}
}
I expect to connect and insert the data.
Can anyone help?