Re: CRecordset::Open postgresql procedure call don't work

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: jeanclaude marzin <jeanclaude(dot)marzin(at)sfr(dot)fr>
Cc: "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: CRecordset::Open postgresql procedure call don't work
Date: 2019-07-15 13:02:21
Message-ID: CAFj8pRCZAXqB8oCFQg88NNzJFjN_bUjmgXUHKFF7XVhgd=dBrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

Dne po 15. 7. 2019 13:40 uživatel jeanclaude marzin <
jeanclaude(dot)marzin(at)sfr(dot)fr> napsal:

> ‌Hi
> I migrate from MSSQL to postgresql 11. I translate MSSQL stored procedure
> to Postgresql one :
>
> CREATE PROCEDURE procacp ()
> LANGUAGE SQL
> AS $$
> SELECT tabjdbexploit.jdbeid, tabjdbexploit.jdbeproc,
> tabjdbexploit.jdbedate, tabjdbexploit.jdbetypemsg,
> tabjdbexploit.jdbeurg, tabjdbexploit.jdbeconfid,
> tabjdbexploit.jdbeetat, tabmsgacp.acpid,
> tabmsgacp.acpnumserie,
> tabmsgacp.acpsignserv, tabmsgacp.acpnumligne,
> tabmsgacp.acpiaorigine, tabmsgacp.acpgdh,
> tabmsgacp.acperv, tabmsgacp.acpcdu,
> tabmsgacp.acpdir, tabmsgacp.acppere,
> tabmsgacp.acpcomplement, tabmsgacp.acpsection
>
> FROM tabjdbexploit INNER JOIN
> tabmsgacp ON tabjdbexploit.jdbeid = tabmsgacp.acpid
>
> ORDER BY tabjdbexploit.jdbedate ASC
> $$;
>
>
>
It cannot to work - PostgreSQL procedures are like Oracle's procedures -
cannot returns any result. Only OUT variables can be changed.

Regards

Pavel

>
>
>
> All seems OK in PgAdmin 4, procedure is created
>
> I use ODBC and Crecorset in C++
>
> When i use the call strSQL = "{CALL procacp()}". It don't work :
>
> Message error : ERROR: procacp() is a procedure
>
> I don't know what to do
>
> Thanks in advance for any assistance
>
> Jean-Claude

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Luca Ferrari 2019-07-15 13:14:38 Re: help understanding pgbench results
Previous Message John McKown 2019-07-15 11:57:31 Re: CRecordset::Open postgresql procedure call don't work