我使用node-jdbc和oracle驱动程序“ojdbc6_g.jar”连接到Oracle数据库。我想执行一些插入查询。如何使用node-jdbc获取生成的ID?
问题:
如何使用节点JDBC插入一个行甲骨文时候才能生成的ID?
席力图召statement.getGeneratedKeys()
但在回调返回以下错误:
> { [Error: Error running instance method java.sql.SQLException:
> operation not allowed
> at oracle.jdbc.driver.OracleStatement.getGeneratedKeys(OracleStatement.java:8425)
> at oracle.jdbc.driver.OracleStatementWrapper.getGeneratedKeys(OracleStatementWrapper.java:1106)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483) ] cause: {} }