[Original] Java is called the Oracle stored procedure to process the Cursor type method.

xiaoxiao2021-03-06  40

Author: freaky Source: http: //blog.9cbs.net/freaky1, get stored procedure returns the value CallableStatement cs = conn.prepareCall; // call the stored procedure ( "{call proc_fbquery (,,)???}") CS.setString (1, MEM); cs.setint (2, n); cs.registeroutparameter (3, oracle.jdbc.oracletypes.cursor); cs.execute (); rs = (resultset) cs.getObject (3) 2, when assigning the storage process: callablestatement cs = conn.prepareCall ("{call proc_fbquery (?)); // Call the stored procedure cs.registeroutParameter (1, oracle.jdbc.oracletypes.cursor); cs.setcursorname (cusorname); // Provide the name of Result cs.setString (1, RS); RS = cs.executeQuery (); rs = (resultset) cs.getObject (1);

转载请注明原文地址:https://www.9cbs.com/read-68047.html

New Post(0)