Hi all

I am using the latest SQL Server 2000 JDBC driver from Microsoft, 
obviously connecting to SQL Server, and have trouble getting the 
return value from stored procedure.

I have no problem to read OUT parameters. For example if I have a 
procedure declared as:

CREATE PROC TEST_PROC 
  @NEW_ID VARCHAR2(10)    

  SELECT @NEW_ID = '123456'
  RETURN 0

I can call and read the value of NEW_ID.

But if I have a procedure

CREATE PROC TEST_PROC2

  DECLARE @RESULT
  SELECT @RESULT = some_value

  RETURN @RESULT

I can not read the returned value. The included documentation 
recommends the syntax:

{[?=]call procedure-name[([parameter][,[parameter]]...)]}
but the driver does not like it. 
Does anyone know the proper syntax to get the returned value?

Thanks

Witold

To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to