{"action":"created","issue":{"url":"https://api.github.com/repos/oracle/node-oracledb/issues/254","labels_url":"https://api.github.com/repos/oracle/node-oracledb/issues/254/labels{/name}","comments_url":"https://api.github.com/repos/oracle/node-oracledb/issues/254/comments","events_url":"https://api.github.com/repos/oracle/node-oracledb/issues/254/events","html_url":"https://github.com/oracle/node-oracledb/issues/254","id":112757533,"number":254,"title":"Is it possible to create bindVars dynamically?","user":{"login":"unotecjapan","id":2397952,"avatar_url":"https://avatars.githubusercontent.com/u/2397952?v=3","gravatar_id":"","url":"https://api.github.com/users/unotecjapan","html_url":"https://github.com/unotecjapan","followers_url":"https://api.github.com/users/unotecjapan/followers","following_url":"https://api.github.com/users/unotecjapan/following{/other_user}","gists_url":"https://api.github.com/users/unotecjapan/gists{/gist_id}","starred_url":"https://api.github.com/users/unotecjapan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unotecjapan/subscriptions","organizations_url":"https://api.github.com/users/unotecjapan/orgs","repos_url":"https://api.github.com/users/unotecjapan/repos","events_url":"https://api.github.com/users/unotecjapan/events{/privacy}","received_events_url":"https://api.github.com/users/unotecjapan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/oracle/node-oracledb/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-22T08:42:06Z","updated_at":"2015-11-02T13:38:28Z","closed_at":"2015-10-22T16:48:50Z","body":"I'm a newbie with JavaScript and Node.js.\r\nI tested blob ins while referring to the document.\r\n\r\nI created a simple table to my DB(Oracle 11g).\r\n```\r\nCREATE TABLE FILETEST(\r\n\tNAME\tVARCHAR2(60),\r\n\tFILE_DATA\tBLOB\r\n);\r\n```\r\n```javascript\r\nconnection.execute(\r\n\t\"INSERT INTO filetest (name, file_data) VALUES (:name, EMPTY_BLOB()) RETURNING file_data INTO :lobbv\",\r\n\t{ name: req.files.myfile.name, lobbv: {type: oracledb.BLOB, dir: oracledb.BIND_OUT} },\r\n\t{ autoCommit: false },\r\n```\r\n\r\nIt worked well.\r\n\r\nNow, I want to create bindVars dynamically. Like below.\r\n```javascript\r\n\tvar obj = new Object();\r\n\tvar obj2 = new Object();\r\n\tobj2.type = oracledb.BLOB;\r\n\tobj2.dir = oracledb.BIND_OUT;\r\n\tobj.name = req.files.myfile.name;\r\n\tobj.lobby = obj2;\r\n\r\nconnection.execute(\r\n\t\"INSERT INTO filetest (name, file_data) VALUES (:name, EMPTY_BLOB()) RETURNING file_data INTO :lobbv\",\r\n\tobj,\r\n\t{autoCommit: false},\r\n```\r\nBut it shows this error.\r\n```\r\n\tORA-01036: illegal variable name/number\r\n```\r\nIs it possible to create bindVars dynamically?\r\n\r\nI'm using oracledb1.3, node.js v0.12.7, Oracle11g r2."},"comment":{"url":"https://api.github.com/repos/oracle/node-oracledb/issues/comments/153018787","html_url":"https://github.com/oracle/node-oracledb/issues/254#issuecomment-153018787","issue_url":"https://api.github.com/repos/oracle/node-oracledb/issues/254","id":153018787,"user":{"login":"cjbj","id":200778,"avatar_url":"https://avatars.githubusercontent.com/u/200778?v=3","gravatar_id":"","url":"https://api.github.com/users/cjbj","html_url":"https://github.com/cjbj","followers_url":"https://api.github.com/users/cjbj/followers","following_url":"https://api.github.com/users/cjbj/following{/other_user}","gists_url":"https://api.github.com/users/cjbj/gists{/gist_id}","starred_url":"https://api.github.com/users/cjbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjbj/subscriptions","organizations_url":"https://api.github.com/users/cjbj/orgs","repos_url":"https://api.github.com/users/cjbj/repos","events_url":"https://api.github.com/users/cjbj/events{/privacy}","received_events_url":"https://api.github.com/users/cjbj/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T13:38:28Z","updated_at":"2015-11-02T13:38:28Z","body":"@unotecjapan check the console.log() output of your object vs. a hand-constructed object - you can see the two console.log() calls in my code snippet.\r\n\r\nIf you still have problems, then post a small, complete script that has the problem."}}