ODBC, ADO, Return Value from SP problem - Mailing list pgsql-general

From Pavel Stehule
Subject ODBC, ADO, Return Value from SP problem
Date
Msg-id Pine.LNX.4.44.0405311453120.23164-100000@kix.fsv.cvut.cz
Whole thread Raw
Responses Re: ODBC, ADO, Return Value from SP problem
List pgsql-general
Hello

    I need use ADODB client via ODBC. I can call stored proc
without problems. I am sure so proc is called (I am loging params)
but retern value is always null.

dim cn as new ADODB.Connection()
cn.Open("DSN=intra","nepi")
Dim cmd As New ADODB.Command
Set cmd.ActiveConnection = cn
cmd.CommandText = "testcallsp"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Referesh()
cmd.Parameters(1).Value = 22
cmd.Execute()
MsgBox cmd.Parameters(0).Value 'only null :-((


Stored Proc is simply

CREATE OR REPLACE FUNCTION testcallsp(integer) RETURNS integer AS '
BEGIN
  RAISE LOG ''% '', $1;
  RETURN coalesce($1,10) + 1;
END; ' LANGUAGE plpgsql;

What is wrong please?

Thank You very much
Pavel Stehule


pgsql-general by date:

Previous
From: Ben-Nes Michael
Date:
Subject: pg_dump and errors
Next
From: Alvaro Herrera
Date:
Subject: Re: Dump 7.1.3->7.4.2