I am using the ODBC Plugin for vCO to connect to the PostgreSQL and everything went OK and I am able to upadte the tables using the string method so far.
Some part of the code is here.
var sqlStatement = 'insert into ' + tableName + ' values (?,?,?,?,?,?,?,?,?,?,?)';
var stat = con.prepareStatement( sqlStatement );
............................
until...........
I have to set an element in the Database, I got into issues, whose data type is integer. I am able to direcly update the table from the PostgreSQL SQL Editor with out any issues. But from javascript of vCO it is giving problems. The code I am trying is something like the folowing.
Hi,
Please try using setNumber() instead of setInt().
More details in this community thread: http://communities.vmware.com/message/2071447#2071447
Hope, this would resolve the issue.
Thanks,
Igor.
Ok, I was too fast here. I don't see setNumber in the API so this is not the same use case. Sorry.
No problem igorstoyanov. Thanks for your inputs. I resolved it by exluding that field in the "PrepareStatement", while exeucting the query. I have used and extra "createStatement()" instead to update the field. Thanks to my colleague (Vidya Nayak) for the suggestion.