and the java to use this could be:
import java.sql.*; import java.io.*; import oracle.jdbc.driver.*; class curvar { public static void main (string args []) throws sqlexception, classnotfoundexception { string driver_class = "oracle.jdbc.driver.oracledriver"; string connect_string = "jdbc:oracle:thin:@slackdog:1521:oracle8"; string query = "begin :1 := sp_listemp; end;"; connection conn; class.forname(driver_class); conn = drivermanager.getconnection(connect_string, "scott", "tiger"); callablestatement cstmt = conn.preparecall(query); cstmt.registeroutparameter(1,oracletypes.cursor); cstmt.execute(); resultset rset = (resultset)cstmt.getobject(1); while (rset.next ()) system.out.println( rset.getstring (1) ); cstmt.close(); } }the following is thanks to marktoml@hotmail.com (mark tomlinson)..
if you use odbc here is a working example, but it requires the use of the
8.0.5.2.0 or later oracle odbc driver, and an 8.0.5 server. 1) create a form with 1 text control (text1) and 1 list control (list1) and 1 button (btnexecute). 2) the only code that you need is a click method on your button. here is the code. ... 下一页