On Thursday 17 Oct 2002 12:13 pm, you wrote:
> Hello,
> the the JDBC-driver (7.4.3.06) do you use has a known bug. DBprocedures
> which returns a resultset fails if autocommit is on. The bug is already
> fixed in the newest available JDBC 2.0 driver
> (ftp://ftp.sap.com/pub/sapdb/bin/java/sapdb-jdbc-bin-7.3.00.29a.jar). If
> you don't need the JDBC 3.0 features or javax.sql.* package please tryout
> these driver. Another workaround is switching off autocommit.
>
> The following code snippet gives an example on how you can handle
> dbprocedures returning a resultset:
>
> Statement stmt = connection.createStatement();
> try {
> stmt.executeUpdate("DROP DBPROC DBProcWithResult3");
> }
> catch (Exception ignore) {}
>
> stmt.executeUpdate("CREATE DBPROC DBProcWithResult3 RETURNS CURSOR
> AS " +"DECLARE :$CURSOR CURSOR FOR SELECT 1 FROM SYSDBA.DUAL;");
>
> CallableStatement cs = this.connection.prepareCall("CALL
> DBProcWithResult3"); ResultSet rs0 = cs.executeQuery();
> while(rs0.next()){
> System.out.println("Value: "+rs0.getInt(1));
> }
> cs.close();
> stmt.close();
>
> Regards,
> Marco Paskamp
>
Thanks,
Setting autocommit to off worked. But websql still does not return the
resultset. anyway my purpose is solved. If the bug has been solved in the
JDBC 2.0 driver why not solve it in to the 3 driver also?
--
Regards
K. M. Kale
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general